Re: Docs for allocation sinking optimization

  • From: Stefan Marr <lua@xxxxxxxxxxxxxx>
  • To: luajit@xxxxxxxxxxxxx
  • Date: Thu, 12 Jul 2012 10:46:36 +0200

Hi Mike:

On 11 Jul 2012, at 17:59, Mike Pall wrote:

> More than you ever wanted to know on how allocation sinking and
> store sinking actually works can be found here:
> 
> http://wiki.luajit.org/Allocation-Sinking-Optimization

As usual a very interesting read, thanks!


> I'd be grateful, if anyone could point me to 1) a mistake in the
> Java code or 2) an option that would allow Hotspot to eliminate
> the temporary allocations.

Not sure whether you consider that cheating, or to much difference, but I would 
try to help the compiler by telling it that x and y are 'final'.
Another thing the compiler could prefer is the 'ideomatic' use of getters and 
private fields. But I guess you tried that?
I am just randomly guessing here anyway.


Best regards
Stefan

-- 
Stefan Marr
Software Languages Lab
Vrije Universiteit Brussel
Pleinlaan 2 / B-1050 Brussels / Belgium
http://soft.vub.ac.be/~smarr
Phone: +32 2 629 2974
Fax:   +32 2 629 3525


Other related posts: