Live data from Hacker News

Unladen Swallow Retrospective

qinsb.blogspot.com

31–34 of 34 posts

Re: Unladen Swallow Retrospective

#33
post #5
post #4

Somewhat relevant to the topic - Mike Pall discusses (2009) the usage of llvm for lua - he's not ditching the approach, just pointing out the difficulties, and why he took on making luajit the way it is: http://lua-users.org/lists/lua-l/2009-06/msg00071.html

A big one Mike misses (because it isn't as critical for Lua AFAIK) is escape analysis. For PyPy our aggressive escape analysis can bring huge wins on things like numeric code and some types of string processing, but no static compilers really do this type of optimization, because it's not very important in C-type languages.

That's interesting. In Java, escape analysis wasn't really a win from a memory perspective when there were good GCs involved. Why is it different in Python/PyPy?

Re: Unladen Swallow Retrospective

#34
post #19
post #5

Earlier quoted context omitted.

A big one Mike misses (because it isn't as critical for Lua AFAIK) is escape analysis. For PyPy our aggressive escape analysis can bring huge wins on things like numeric code and some types of string processing, but no static compilers really do this type of optimization, because it's not very important in C-type languages.

Mike said he'll be working on escape analysis to decrease the garbage collection if I remember correctly...

I take this back. I've read all Mike's post in the lua mailing list, and found the reference where he talks about it, and in fact as not considering it (yet)

it was from old posting in 3/14/2006 5:50PM:

"* Garbage collection and heap allocation put Lua at a speed disadvantage to languages with manual memory management. The impact is less in Lua than other dynamic languages because of typed-value storage and immutable shared strings. Adding a custom memory allocator to the Lua core could be beneficial. Complex solutions like escape analysis are not on my radar for LuaJIT (yet). "

Post reply on HN