[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: LuaJIT performance query
- From: David Given <dg@...>
- Date: Sat, 14 Jun 2008 21:24:07 +0100
Let's say I'm writing a program that's intended for use on LuaJIT.
Is it still necessary to cache globals in local variables for decent
performance, or can I expect the JIT to optimise this for me?
For example:
i = 0
while (i < 10000) do i = i + 1 end
vs.
local i = 0
while (i < 10000) do i = i + 1 end
--
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
│ "I have always wished for my computer to be as easy to use as my
│ telephone; my wish has come true because I can no longer figure out
│ how to use my telephone." --- Bjarne Stroustrup
Attachment:
signature.asc
Description: OpenPGP digital signature