develooper Front page | perl.perl5.porters | Postings from December 2009

[PATCH] innocent sv_u optimization for the compiler

Thread Next
Reini Urban
December 6, 2009 06:59
[PATCH] innocent sv_u optimization for the compiler
Message ID:
pv first. pv's are the most common field in this union.
Innocently looking union member swap, but this helps statically initializing
union members on gcc, otherwise we get "initializer element is not
computable at load time".
This speeds up initializing larger B::C/B::CC compiled programs with
-O1/-O2 by 10%, and
allows it to startup in almost the same speed as with 5.6 or 5.8.
Well, we introduced those mostly useless version and Regexp GVs at
init time. Sigh.

I've found out that gcc permits static initialization of unions if the
first member of the union matches.
So I could fix -fcog (static pv initialization) for 5.10 and higher
without major struct hackery in the compiler.
Reini Urban 

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About