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

[PATCH] innocent sv_u optimization for the compiler

Thread Next
From:
Reini Urban
Date:
December 6, 2009 06:59
Subject:
[PATCH] innocent sv_u optimization for the compiler
Message ID:
6910a60912060659s16605d9bt3e0fcf1065bfb496@mail.gmail.com
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
http://phpwiki.org/           http://murbreak.at/

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About