develooper Front page | perl.perl5.porters | Postings from September 2012

optimising JRuby by avoiding hashes

Thread Next
Nicholas Clark
September 7, 2012 07:30
optimising JRuby by avoiding hashes
Message ID:
I was talking to Ash Berlin last night at the* meeting and he
mentioned an interesting article on one approach taken by the developers
of JRuby to optimise its performance without compromising any part of Ruby's
dynamic nature - avoiding hash lookups in hot paths:

One of the areas they were able to do this was method lookups. Their approach
is described in useful detail. Previously Chip had mentioned privately that
there might be scope for optimising method lookup in Perl 5. Specifically,
work from the assumption that most of the time at most call sites $a->foo
is going to have the same ref($a).

This may not be *that* hard to implement, as a bunch of the evil work is
already done - we have method caching and ISA caching, and the infrastructure
to invalidate those caches.

So does anyone want to see if they can have some fun speeding this up?

Nicholas Clark

* Don't worry. We were talking about Ruby. Not the four letter word that is
  off-topic for

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