[Patch] Tweak for performance __gslice_to_index

Paolo Carlini pcarlini@suse.de
Sun Dec 10 02:10:00 GMT 2006


Hi,

finally I decided to refine this improvement. The implementation had 
various inefficiencies, particularly evident when multiple dimensions 
are used: in particular a new "inner_product" was recomputed from 
scratch for every __j and the final loop over __k2 didn't terminate as 
soon as __t[__k2] < __l[__k2]. As an example, on a 2.4G Core 2 Duo I'm 
seeing this kind of improvement for the snippet I mean to add to the 
performance testsuite:

base
====

real    0m23.649s
user    0m19.393s
sys     0m4.220s

peak
====

real    0m9.927s
user    0m5.748s
sys     0m4.180s

Tested x86-64-linux, will wait until tomorrow italian time.

Paolo.

PS: As part of the patch I'm also removing the builtin_alloca call, 
which doesn't seem necessary performance-wise in all my tests (another 
tiny bit of libstdc++/28277, if you want)

/////////////////
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CL_vala_tw_4_c
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20061210/a22f8bd9/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_vala_tw_4_c
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20061210/a22f8bd9/attachment-0001.ksh>


More information about the Libstdc++ mailing list