Re: [Cluecc-users] Lua GOTO, was Archives
Status: Pre-Alpha
Brought to you by:
dtrg
|
From: David G. <dg...@co...> - 2009-06-03 21:33:38
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 McKinley, Richard R wrote: > I wanted to read up before asking a question, thanks. > > Can anything be done with Lua's support for proper tail calls to rig up > a sort of GOTO to speed things up? Yes, I did wonder about that, and did a bit of benchmarking to see how fast they are. The end result is that it would be perfectly possible, with one Lua function per basic block, but that passing state between basic blocks would require upvalues. This means every call to a C function would have to allocate these, which I think would do poor things for performance. It may be worth doing anyway: I think Lua, and particularly LuaJIT, may contain code to optimise away at least some of the allocations. However, I rather ran out of time before getting that far. [...] > By the way, looking at your blog, are you in Scotland like me? I'm Scottish, but currently living in Reading. Unfortunately... - -- ┌─── dg@cowlark.com ───── http://www.cowlark.com ───── │ │ "People who think they know everything really annoy those of us who │ know we don't." --- Bjarne Stroustrup -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFKJurof9E0noFvlzgRArTdAKCmSZXwIfUKVAOgDip09cYgOS7wxQCgrEnG Cta9fgGGKzYe0iHmzPBIcvk= =Wdlu -----END PGP SIGNATURE----- |