lua-users home
lua-l archive

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


> I commented it out just so I could run the speed test. WOW
> 
> https://gist.github.com/1334864

The speed difference you see is expected, of course.

Surely any operation can be made faster by providing a VM instruction
for it. The hard decision is what to include, which reminds me of
something I heard about I think it was Word: no one uses more than 5%
of Word, by each person uses a different 5%, hence the bloat.

If you find yourself writing bit-intensive programs in Lua, perhaps
a dedicated C function is recommended. I understand that not all Lua
environments can load C libraries (WoW comes to mind); the bit32 library
is meant to make bit manipulation possible in Lua, not to make it fast.