[Developers] Patch: pass arrays and hashes by reference in interface parser

Erik Schnetter schnetter at cct.lsu.edu
Tue Feb 6 08:30:56 CST 2007


On Feb 5, 2007, at 10:05:09, Thomas Radke wrote:

> This patch optimises the interface_parser.pl script to pass perl lists
> and hashes by reference rather than by value.
>
> It turned out that most of the runtime of the parameter parser was  
> spent
> in flattening list/hash arguments during function calls. Using
> references conveniently solves this performance bottleneck; for the
> 'PublicThorns' configuration used in the nightly integration tests  
> (with
> a list of some 120 thorns), the overall CST runtime went from 100s  
> down
> to 8s [although the same "mistake" of passing lists/hashes is done in
> the schedule and parameter parser scripts, it's probably not worth the
> effort fixing it there as well].

Thank you.
Thank you.
Thank you.

I had looked at that as well, and I thought it was somehow the O(n^2)  
algorithm to check for interface consistency.  Changing that to an O 
(n) algorithm would have been complicated, so I gave up.

-erik

-- 
Erik Schnetter <schnetter at cct.lsu.edu>

My email is as private as my paper mail.  I therefore support encrypting
and signing email messages.  Get my PGP key from www.keyserver.net.



-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://www.cactuscode.org/pipermail/developers/attachments/20070206/6bc56d42/attachment.bin 


More information about the Developers mailing list