8th version using builtin Timsort to sort bible text lines and output some sorted lines:
"bible.txt" f:slurp >s "\n" s:/ var, lines
: app:main
lines @ ' s:cmp a:sort
a:len n:1- >r ( a:@ . cr ) r@ 10 n:- r> loop drop
bye ;
Output is:
PS C:\temp> 8th .\sort.8th
Zebulun and Naphtali were a people that jeoparded their lives unto the death in the high places of the field.
Zebulun shall dwell at the haven of the sea; and he shall be for an haven of ships; and his border shall be unto Zidon.
Zedekiah was one and twenty years old when he began to reign, and he reigned eleven years in Jerusalem. And his mother's name was Hamutal the daughter of Jeremiah of Libnah.
Zedekiah was one and twenty years old when he began to reign, and reigned eleven years in Jerusalem.
Zelek the Ammonite, Naharai the Berothite, the armourbearer of Joab the son of Zeruiah,
Zelek the Ammonite, Nahari the Beerothite, armourbearer to Joab the son of Zeruiah,
Zenan, and Hadashah, and Migdalgad,
Zion heard, and was glad; and the daughters of Judah rejoiced because of thy judgments, O LORD.
Zion shall be redeemed with judgment, and her converts with righteousness.
Zion spreadeth forth her hands, and there is none to comfort her: the LORD hath commanded concerning Jacob, that his adversaries should be round about him: Jerusalem is as a menstruous woman among them.
Ziph, and Telem, and Bealoth,
PS C:\temp>
Timing is:
PS C:\temp> Measure-Command { 8th .\sort.8th }
Days : 0
Hours : 0
Minutes : 0
Seconds : 0
Milliseconds : 320
Ticks : 3203650
TotalDays : 3,70792824074074E-06
TotalHours : 8,89902777777778E-05
TotalMinutes : 0,00533941666666667
TotalSeconds : 0,320365
TotalMilliseconds : 320,365