lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Wed, 6 Jun 2007 12:37:32 +0500
"Shoaib Meenai" <shobiz91@gmail.com> wrote:

> Both programs are in effect the same, and I expected both to have a
> similar performance. However, on my machine, the first program takes 7
> seconds for n = 5000000, but the second takes 12 seconds! What's the
> reason for the performance discrepancy?
operation "not". remember, Lua is not an optimizing compiler. and
5000000 "nots" is definitely slower thant 5000000 "nothings". %-)