[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: For loop benchmarks between Octave versions
From: |
Julien Bect |
Subject: |
Re: For loop benchmarks between Octave versions |
Date: |
Mon, 23 Jun 2014 20:42:03 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 |
Le 22/06/2014 15:32, Julien Bect a écrit :
Le 17/06/2014 17:11, Julien Bect a écrit :
I don't much like having to manually match up new/delete, so I'd
rather see that go inside a constructor/destructor pair. Done
properly and with inlining, I don't see why it would be inefficient
and perhaps we could eliminate the BEGIN/END macros?
I try that right now.
John,
As you know, using a constructor/destructor pair is actually what the
BEGIN/END macros currently do. I have tried improving this
constructor/destructor approach with inlining, but couldn't get a
significant improvement in this direction. Perhaps didn't I try hard
enough...
Ok, I have tried harder and finally obtained a (significant ?) speed
improvement using a constructor/destructor pair and templated classes
(see attached patch).
The BEGIN/END macros are still there, but of course they can be removed
(I find them rather convenient, though).
Here are the results that I have obtained on 3.8.2-RC1, compiled with
--enable-jit (but with jit OFF) :
without patch with patch
doubleForLoop/a=1 2609.8 [ 5.7] 2250.0 [ 9.7] evol: -13.8%
doubleForLoop/a=b 3034.4 [ 5.1] 2570.3 [ 12.0] evol: -15.3%
doubleForLoop/a+b 2084.3 [ 6.4] 1379.3 [ 1.0] evol: -33.8%
vectorOfSquares 6864.3 [ 23.5] 5963.7 [ 20.2] evol: -13.1%
mandel 226.9 [ 1.6] 180.5 [ 1.6] evol: -20.4%
fib 667.8 [ 3.4] 539.6 [ 2.1] evol: -19.2%
parse_int 2376.0 [ 7.7] 2143.0 [ 5.1] evol: -9.8%
quicksort 1230.7 [ 10.7] 1066.8 [ 16.4] evol: -13.3%
pi_sum 18151.0 [ 39.9] 11030.2 [ 21.5] evol: -39.2%
rand_mat_stat 559.0 [ 1.6] 519.9 [ 6.9] evol: -7.0%
rand_mat_mul 367.4 [ 2.0] 366.8 [ 2.6] evol: -0.2%
printfd 2972.6 [ 9.0] 2833.3 [ 8.0] evol: -4.7%
All results are in ms: median over 10 replications [mean absolute
deviation about the median].
i686-linux-gnu / gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-1ubuntu1)
We're still a long way from the performances of Octave 3.4.3 (or even
3.6.0, for some tests):
Octave 3.4.3 Octave 3.6.0 3.8.2-RC1 + patch
doubleForLoop/a=1 1487.4 [ 4.7] 1632.5 [ 11.9] 2250.0 [ 9.7]
doubleForLoop/a=b 2206.9 [ 8.9] 2239.6 [ 21.1] 2570.3 [ 12.0]
doubleForLoop/a+b 1136.0 [ 3.6] 1575.0 [ 8.3] 1379.3 [ 1.0]
vectorOfSquares 3435.3 [ 10.8] 3783.2 [ 4.2] 5963.7 [ 20.2]
mandel 130.7 [ 0.6] 139.1 [ 0.6] 180.5 [ 1.6]
fib 346.7 [ 1.3] 409.9 [ 1.2] 539.6 [ 2.1]
parse_int 1461.8 [ 3.1] 1675.3 [ 8.2] 2143.0 [ 5.1]
quicksort 675.3 [ 9.4] 723.4 [ 8.8] 1066.8 [ 16.4]
pi_sum 9197.3 [ 55.3] 14386.8 [ 20.1] 11030.2 [ 21.5]
rand_mat_stat 322.8 [ 3.1] 306.7 [ 5.3] 519.9 [ 6.9]
rand_mat_mul 367.7 [ 10.3] 367.7 [ 26.8] 366.8 [ 2.6]
printfd 2426.1 [ 5.2] 2097.2 [ 10.4] 2833.3 [ 8.0]
I also have interesting results about the behaviour of JIT on this
benchmark suite, but that's for another thread I think.
jbProfilerTemplate.patch
Description: Text Data
perf.m
Description: Text Data
- Re: For loop benchmarks between Octave versions, (continued)
- Re: For loop benchmarks between Octave versions, ijourneaux, 2014/06/17
- Re: For loop benchmarks between Octave versions, Julien Bect, 2014/06/17
- Re: For loop benchmarks between Octave versions, John W. Eaton, 2014/06/17
- Re: For loop benchmarks between Octave versions, Julien Bect, 2014/06/17
- Re: For loop benchmarks between Octave versions, John W. Eaton, 2014/06/17
- Re: For loop benchmarks between Octave versions, Jordi Gutiérrez Hermoso, 2014/06/17
- Re: For loop benchmarks between Octave versions, Julien Bect, 2014/06/17
- Re: For loop benchmarks between Octave versions, Daniel J Sebald, 2014/06/17
- Re: For loop benchmarks between Octave versions, Julien Bect, 2014/06/22
- Re: For loop benchmarks between Octave versions, PrasannaKumar Muralidharan, 2014/06/23
- Re: For loop benchmarks between Octave versions,
Julien Bect <=
- Re: For loop benchmarks between Octave versions, Daniel J Sebald, 2014/06/23
- Re: For loop benchmarks between Octave versions, Julien Bect, 2014/06/24
- Re: For loop benchmarks between Octave versions, Daniel J Sebald, 2014/06/24
- Re: For loop benchmarks between Octave versions, Julien Bect, 2014/06/18
- Re: For loop benchmarks between Octave versions, Julien Bect, 2014/06/25
- Re: For loop benchmarks between Octave versions, Daniel J Sebald, 2014/06/25
- Re: For loop benchmarks between Octave versions, Julien Bect, 2014/06/25
- Re: For loop benchmarks between Octave versions, Julien Bect, 2014/06/26
Re: For loop benchmarks between Octave versions, PrasannaKumar Muralidharan, 2014/06/17