Re: Loop efficiency
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Loop efficiency
- From: Enrico Colombini <erix@...>
- Date: 2012年12月20日 09:20:27 +0100
On 19/12/2012 22.57, Dirk Laurie wrote:
I replaced the line
sum = sum + j + v
by
sum = tostring(v):upper()
and the time jumps to about 15 seconds. On LuaJIT it jumped
from 0.3 to to 136 seconds. I could have got myself a mug of
coffee. Bye-bye to the conventional wisdom that LuaJIT is
faster than PUC-Rio!
I see your point, but probably that's not a very significant example: I
think you're actually timing allocations and string hashing.
--
Enrico