On 21/09/2012, at 12:28 AM, Mike Pall wrote: > * Do not try to second-guess the JIT compiler. > - It's perfectly ok to write 'z = x[a+b] + y[a+b]'. > - Do not try CSE by hand, e.g. 'local c = a+b'. Could you expand on this a little? I asks because sometimes "hand-made CSE" improves readability, so: - Is it actually detrimental to do the above, or just pointless as a speed optimization? - Does this only apply to index expressions? (I suspect not, but all your examples involved indexes) - Does this only apply to relatively simple expressions, if so, can you say roughly how simple? Geoff