Hi all, just out of interest I've done the tests with double arrays in Java. The results for the Arrays.sort are 1.060us. Now it's becoming interesting. The results for the Batcher sort are: 803.784ns. Already an improvement! Finally I've tried once again to do the Batcher double sort in the same way as I did in C with the "inlining" of all statements in one method and the results are: 274.880ns!! The same league as the C version :) This time I did not get the "COMPILE SKIPPED: out of nodes parsing method" message when watching the compiler output.
I would have guessed that the JVM would do by itself that kind of inlining, but it obviously does not. This inlining has the biggest effect of all. I'll try to find out how to create an inlining version that does not cause this "COMPILE SKIPPED". For completeness here are the results of the Benchmark class: -- batcherDoubleSort: action statistics: first = 10.576 us, mean = 803.784 ns (CI deltas: -369.781 ps, +397.860 ps), sd = 1.720 us (CI deltas: -229.938 ns, +371.988 ns) WARNING: SD VALUES MAY BE INACCURATE ---------- --the action statistics were calculated from block statistics --each block measured 128 task executions --the user says that task internally performs m = 10000 actions --then the number of actions per block measurement is a = 1280000 --block statistics: mean = 1.029 s (CI deltas: -473.320 us, +509.260 us), sd = 1.946 ms (CI deltas: -260.145 us, +420.856 us) --the forumla used to convert block statistics to action statistics (mean scales as 1/a, sd scales as 1/sqrt(a)) assumes that the action execution times are iid ---------- --each confidence interval (CI) is reported as either +- deltas from the point estimate, or as a closed interval ([x, y]) --each confidence interval has confidence level = 0.95 ---------- --sd results have unknown validity (the environmental noise test was skipped) ---------- --action sd values ALMOST CERTAINLY GROSSLY INFLATED by outliers --they cause at least 94.50279412648933% of the measured VARIANCE according to a equi-valued outlier model --model quantities: a = 1280000.0, muB = 1.0288441191333333, sigmaB = 0.0019464056773121957, muA = 8.037844680729166E-7, sigmaA = 1.7203958167093106E-6, tMin = 0.0, muGMin = 4.018922340364583E-7, sigmaG = 1.0047305850911458E-7, cMax1 = 229870, cMax2 = 66440, cMax = 66440, cOutMin = 66440, varOutMin = 3.5802336876801615E-6, muG(cOutMin) = 4.018925748069688E-7, U(cOutMin) = 8.144541933332152E-6 -- -- javaDoubleSort: action statistics: first = 1.337 us, mean = 1.060 us (CI deltas: -774.553 ps, +952.287 ps), sd = 3.829 us (CI deltas: -703.088 ns, +1.507 us) WARNING: execution times have mild outliers, SD VALUES MAY BE INACCURATE ---------- --the action statistics were calculated from block statistics --each block measured 128 task executions --the user says that task internally performs m = 10000 actions --then the number of actions per block measurement is a = 1280000 --block statistics: mean = 1.356 s (CI deltas: -991.428 us, +1.219 ms), sd = 4.332 ms (CI deltas: -795.453 us, +1.705 ms) --the forumla used to convert block statistics to action statistics (mean scales as 1/a, sd scales as 1/sqrt(a)) assumes that the action execution times are iid ---------- --each confidence interval (CI) is reported as either +- deltas from the point estimate, or as a closed interval ([x, y]) --each confidence interval has confidence level = 0.95 ---------- --EXECUTION TIMES APPEAR TO HAVE OUTLIERS --this was determined using the boxplot algorithm with median = 1.356 s, interquantileRange = 5.429 ms --1 are mild (on the high side): #59 = 1.373 s ---------- --sd results have unknown validity (the environmental noise test was skipped) ---------- --action sd values ALMOST CERTAINLY GROSSLY INFLATED by outliers --they cause at least 98.00343339546181% of the measured VARIANCE according to a equi-valued outlier model --model quantities: a = 1280000.0, muB = 1.3563777259499998, sigmaB = 0.004331502593009262, muA = 1.0596700983984375E-6, sigmaA = 3.828543570304954E-6, tMin = 0.0, muGMin = 5.298350491992187E-7, sigmaG = 1.3245876229980468E-7, cMax1 = 91174, cMax2 = 24081, cMax = 24081, cOutMin = 24081, varOutMin = 1.838732058970935E-5, muG(cOutMin) = 5.298421637517654E-7, U(cOutMin) = 2.869228377114931E-5 -- -- batcherDoubleSortInlining: action statistics: first = 9.769 us, mean = 274.880 ns (CI deltas: -32.818 ps, +54.994 ps), sd = 372.099 ns (CI deltas: -125.295 ns, +165.081 ns) WARNING: EXECUTION TIMES HAVE EXTREME OUTLIERS, SD VALUES MAY BE INACCURATE ---------- --the action statistics were calculated from block statistics --each block measured 512 task executions --the user says that task internally performs m = 10000 actions --then the number of actions per block measurement is a = 5120000 --block statistics: mean = 1.407 s (CI deltas: -168.028 us, +281.568 us), sd = 841.965 us (CI deltas: -283.510 us, +373.536 us) --the forumla used to convert block statistics to action statistics (mean scales as 1/a, sd scales as 1/sqrt(a)) assumes that the action execution times are iid ---------- --each confidence interval (CI) is reported as either +- deltas from the point estimate, or as a closed interval ([x, y]) --each confidence interval has confidence level = 0.95 ---------- --EXECUTION TIMES APPEAR TO HAVE OUTLIERS --this was determined using the boxplot algorithm with median = 1.407 s, interquantileRange = 451.423 us --4 are EXTREME (on the high side): #56 = 1.409 s, #57 = 1.410 s, #58 = 1.411 s, #59 = 1.411 s --3 are mild (on the high side): #53 = 1.408 s, #54 = 1.408 s, #55 = 1.408 s ---------- --sd results have unknown validity (the environmental noise test was skipped) ---------- --action sd values ALMOST CERTAINLY GROSSLY INFLATED by outliers --they cause at least 87.25616865016346% of the measured VARIANCE according to a equi-valued outlier model --model quantities: a = 5120000.0, muB = 1.4073847597333335, sigmaB = 8.419649061276006E-4, muA = 2.748798358854167E-7, sigmaA = 3.720994341524508E-7, tMin = 0.0, muGMin = 1.3743991794270834E-7, sigmaG = 3.4359979485677086E-8, cMax1 = 1814083, cMax2 = 618741, cMax = 618741, cOutMin = 618741, varOutMin = 6.185632578622427E-7, muG(cOutMin) = 1.3744003903128424E-7, U(cOutMin) = 1.274736193469342E-6 -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en