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

Re: DAVEM TPF grant#2 report #149,#150,#151

Thread Previous | Thread Next
From:
Dave Mitchell
Date:
December 2, 2016 09:33
Subject:
Re: DAVEM TPF grant#2 report #149,#150,#151
Message ID:
20161202093322.GP4785@iabyn.com
On Thu, Dec 01, 2016 at 11:41:17AM -0700, Karl Williamson wrote:
> On 11/28/2016 02:18 AM, Dave Mitchell wrote:
> > I've also been looking into whether the lexer's token recogniser
> > (keywords.c) could be done in a different way: the current approach, as
> > used for the last 10 years, generates a custom code-driven trie, which uses
> > very few CPU instructions; but these days branch prediction is more important,
> > and that code style kills branch prediction. I suspect that a data-driven
> > trie will perform better now.
> 
> I would be surprised if speeding this up would have much effect on programs,
> except for possibly string evals in an inner loop.  Am I wrong?

I was looking for an easy improvement to startup costs. But I've just found
that my work makes no difference.

When I looked at startup costs a while ago using cachgrind, I got it into
my head that Perl_keyword() was having a disproportionate number of branch
prediction failures - enough to affect startup time. However, when I
re-run cachgrind now on 'perl -MCPAN -e 1', I see no such cost - I suspect
that I misread a figure by a factor of 10 at some point in the past.

:-(

-- 
Dave's first rule of Opera:
If something needs saying, say it: don't warble it.

Thread Previous | 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