On Apr 11, 2011, at 12:47 PM, Brendan Eich wrote:
>> 
> 
> Then the only downside is the pd allocation. Any way to avoid that?
> 
> /be

Use a GC that supports cheap allocation/recovery of short-lived objects :-)

It's probably premature optimization to worry about that one pd allocation 
without knowing more about the actual use case.   I suspect that in many cases, 
the caller would actually want to get the pd back and so it would probably be 
best to return: {object: obj, desc: pd}.  Of course that has yet another 
ephemeral object allocation. But really, if you over worry about such 
allocations you end up doing FORTRAN-like coding.

Maybe it's time to work on some JavaScript ephemeral GC benchmarks...

Allen
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to