[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Storing state information (was Re: Ah, those uninitiated people...)
- From: Mike Pall <mikelu-1001@...>
- Date: Fri, 15 Jan 2010 13:28:09 +0100
Peter Sommerfeld wrote:
> I'm not sure I understand the benchmark and the numbers correctly.
> Does it mean that there is no reason to avoid costly patterns
> like objects using closures (PiL 16.4) and others anymore?
Basically yes. But I should note that it's easier for the compiler
to optimize access to tables holding instances than to closures.
The one thing you need to watch out for right now is that it's not
a good idea to create lots of closures for the same prototype and
call different ones from the same inner loops. The JIT compiler
specializes to each individual closure and not the prototype and
it's hard to teach it to back off on specialization.
--Mike
- References:
- Re: Ah, those uninitiated people..., Tony Finch
- Re: Ah, those uninitiated people..., David Kastrup
- Re: Ah, those uninitiated people..., Tony Finch
- Re: Ah, those uninitiated people..., David Given
- Re: Ah, those uninitiated people..., Wesley Smith
- Re: Ah, those uninitiated people..., Sean Conner
- Re: Ah, those uninitiated people..., Mark Hamburg
- Storing state information (was Re: Ah, those uninitiated people...), Mark Hamburg
- Re: Storing state information (was Re: Ah, those uninitiated people...), Mike Pall
- Re: Storing state information (was Re: Ah, those uninitiated people...), Peter Sommerfeld