|
From: | Julien Bect |
Subject: | Re: For loop benchmarks between Octave versions |
Date: | Tue, 24 Jun 2014 09:04:26 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 |
Le 23/06/2014 20:58, Daniel J Sebald a écrit :
Ok, I have tried harder and finally obtained a (significant ?) speed improvement using a constructor/destructor pair and templated classes (see attached patch).[snip] Looks good, especially this one:doubleForLoop/a+b 2084.3 [ 6.4] 1379.3 [ 1.0] evol: -33.8%To clarify, in previous double-for-loop tests I used just the non-assigning result "1" rather than "a=1" to try and find a test that is as close as possible to pure for-loop dependent. The "a=1" test does illustrate though a slow down when there is an operator involved, i.e., "a+b".
Ok, I have included your "non-assigning 1" test in my benchmark. (I have also modified some numerical constants in the benchmarks, to make the whole benchmark suite faster to run, so please don't compare with my previous results since the tests have changed. The new function is attached.)
Here are the new results on 3.8.2-RC1: without patch with patch doubleForLoop/1 181.8 [ 1.8] 210.2 [ 7.9] evol: +15.6% doubleForLoop/a=1 294.7 [ 2.6] 259.2 [ 12.0] evol: -12.0% doubleForLoop/a=b 275.6 [ 1.6] 235.1 [ 1.3] evol: -14.7% doubleForLoop/a=a+b 335.8 [ 1.9] 221.4 [ 1.8] evol: -34.1% doubleForLoop/a=sin(b*i) 383.4 [ 3.6] 318.6 [ 2.2] evol: -16.9% vectorOfSquares 677.7 [ 6.3] 591.9 [ 2.1] evol: -12.7% mandel 224.9 [ 1.3] 179.8 [ 0.6] evol: -20.0% fib 687.6 [ 1.6] 559.3 [ 1.4] evol: -18.6% parse_int 2392.1 [ 13.2] 2166.1 [ 19.9] evol: -9.4% quicksort 1244.9 [ 19.3] 1065.6 [ 13.1] evol: -14.4% pi_sum 18236.1 [ 46.5] 11358.7 [258.4] evol: -37.7% rand_mat_stat 572.8 [ 23.4] 534.5 [ 43.6] evol: -6.7% rand_mat_mul 515.9 [ 92.1] 369.3 [ 15.5] evol: -28.4% printfd 2965.9 [ 47.4] 2828.7 [ 21.0] evol: -4.6% And here is the comparison with 3.4.3: Octave 3.4.3 3.8.2-RC1 + patch doubleForLoop/1 114.9 [ 0.9] 210.2 [ 7.9] evol: +83.0% doubleForLoop/a=1 165.5 [ 0.6] 259.2 [ 12.0] evol: +56.6% doubleForLoop/a=b 190.2 [ 0.7] 235.1 [ 1.3] evol: +23.7% doubleForLoop/a=a+b 171.5 [ 1.2] 221.4 [ 1.8] evol: +29.1% doubleForLoop/a=sin(b*i) 224.6 [ 1.6] 318.6 [ 2.2] evol: +41.9% vectorOfSquares 326.8 [ 4.0] 591.9 [ 2.1] evol: +81.1% mandel 126.4 [ 1.6] 179.8 [ 0.6] evol: +42.2% fib 336.2 [ 1.1] 559.3 [ 1.4] evol: +66.3% parse_int 1414.1 [ 16.0] 2166.1 [ 19.9] evol: +53.2% quicksort 632.8 [ 11.3] 1065.6 [ 13.1] evol: +68.4% pi_sum 8678.9 [ 84.2] 11358.7 [258.4] evol: +30.9% rand_mat_stat 315.9 [ 10.8] 534.5 [ 43.6] evol: +69.2% rand_mat_mul 387.3 [ 20.1] 369.3 [ 15.5] evol: -4.7% printfd 2404.7 [ 30.9] 2828.7 [ 21.0] evol: +17.6% I hope this helps.
perf.m
Description: Text Data
[Prev in Thread] | Current Thread | [Next in Thread] |