octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: For loop benchmarks between Octave versions


From: Daniel J Sebald
Subject: Re: For loop benchmarks between Octave versions
Date: Mon, 23 Jun 2014 13:58:55 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16

On 06/23/2014 01:42 PM, Julien Bect wrote:
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).
[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".

Dan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]