Toddler's Corner > Romper Room

Playing

<< < (5/5)

jj2007:
Thanks to everybody :icon14:

So the conclusion seems to be: don't bother with integers, doubles are much faster.

jj2007:
Playing with an ordinary array of doubles (following a FreeBasic thread):

--- Code: ---Intel(R) Core(TM) i5-2450M CPU @ 2.50GHz
generating 10000000 elements with MasmBasic Rand() took 188 ms
sorting took 1935 ms    (random)
sorting took 724 ms     (sorted)
sorting took 726 ms     (reversed)

top values:
999999.666120860
999999.510124329
999999.437946829
999999.430961910
999999.392312023

middle values:
485.134311021929
484.920106829768
484.847463668948
484.597403557664
484.515912832385

low values:
-999998.337589204
-999998.381827027
-999998.455401510
-999998.697079718
-999998.909886926
--- End code ---

Source and exes attached. Does anybody know what happened to the incredibly fast table sort?

MichaelW in Table sort. Fastest sort algo I've ever come to know...:
--- Quote ---In my tests sorting the int_list array, and reshuffling it between the sorts, the table sort was ~800 times faster than the CRT qsort, and ~250 times faster than an optimized, integer array only version of the Microsoft qsort code from the PSDK
--- End quote ---

six_L:

--- Quote ---Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz
generating 10000000 elements with MasmBasic Rand() took 164 ms
sorting took 1564 ms   (random)
sorting took 563 ms   (sorted)
sorting took 579 ms   (reversed)

top values:
999999.667983505
999999.129213396
999998.870305720
999998.722691092
999997.930601242

middle values:
102.337449790602
101.637560875778
101.326499135857
101.112294943695
101.109966637259

low values:
-999999.128747731
-999999.234918505
-999999.593477696
-999999.688006938
-999999.893829226

--- End quote ---

Siekmanski:
Is table sort a special case sorting algorithm for rows and columns?


--- Code: ---Intel(R) Core(TM) i7-4930K CPU @ 3.40GHz
generating 10000000 elements with MasmBasic Rand() took 150 ms
sorting took 1379 ms    (random)
sorting took 518 ms     (sorted)
sorting took 521 ms     (reversed)

top values:
999999.702442441
999999.508727345
999999.434221539
999999.387189749
999999.148771170

middle values:
518.907327206498
518.879853190547
518.851447852021
518.782995642787
518.665183337098

low values:
-999997.963197529
-999998.359475285
-999998.406041414
-999999.026302248
-999999.867286533

--- End code ---

jj2007:

--- Quote from: Siekmanski on October 26, 2017, 10:32:40 PM ---Is table sort a special case sorting algorithm for rows and columns?
--- End quote ---

No idea. The exe I posted uses MasmBasic's ArraySort (a radix sort), but I wonder what kind of animal is that table sort: "the table sort was ~800 times faster than the CRT qsort" (MichaelW, a serious person as we all know).

Navigation

[0] Message Index

[*] Previous page

Go to full version