Compare sorting algorithms' performance: Difference between revisions

m
→‎{{header|REXX}}: changed the font size so as to display more information in a window.
(→‎{{header|REXX}}: added the computer programming language REXX.)
m (→‎{{header|REXX}}: changed the font size so as to display more information in a window.)
Line 2,460:
if seed=='' | seed=="," then seed= 1946 /*use a repeatable seed for RANDOM BIF*/
if datatype(seed, 'W') then call random ,,seed /*Specified? Then use as a RANDOM seed*/
kinds= 3; #= 250; _hdr= #; hdr= /*hardcoded/fixed number of datum kinds*/
do j=1 for ranges; _= _ + _ /*obtain the highest number of elements*/
end; #w= length( commas(_) ) /* " " width of highest #elements*/
do ra=1 for ranges
say ' ··· comparing various sorts for an array size of: ' right( commas(#), #w)
hdr= hdr || center( commas(#) "numbers", 25)'│' /*(top) header for the output title.*/
do ki=1 for kinds
Line 2,723 ⟶ 2,719:
end /*while i¬==0*/; return</lang>
{{out|output|text=&nbsp; when using the default inputs:}}
 
(Shown at three-quarter size.)
<pre style="font-size:75%">
<pre>
··· comparing various sorts for an array size of: 250
··· comparing various sorts for an array size of: 500
··· comparing various sorts for an array size of: 1,000
··· comparing various sorts for an array size of: 2,000
··· comparing various sorts for an array size of: 4,000
 
 
 
│ 250 numbers │ 500 numbers │ 1,000 numbers │ 2,000 numbers │ 4,000 numbers │
sort type │ allONES ascend random │ allONES ascend random │ allONES ascend random │ allONES ascend random │ allONES ascend random │
Line 2,750 ⟶ 2,741:
────────────┴─────────────────────────┴─────────────────────────┴─────────────────────────┴─────────────────────────┴─────────────────────────┘
</pre>
 
 
=={{header|Ruby}}==