lua-users home
lua-l archive

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

What's faster: 's:find(...)' or 'string.find(s,...)'?

I did a few preliminary tests and they seem to indicate that the object
variant is 5 to 10% faster (it's definitely faster to type...). Has
anyone done a performance analysis about OO calls vs normal calls?

To generalise: is there a collection of hints (a page in the wiki, for
instance) which details how to achieve maximum performance in Lua? Stuff
like using locals instead of globals etc. etc.

(I have seen this in the Gems: "* Lua performance tips; Roberto
Ierusalimschy" so *something* seems to be *somewhere*.)

cheers  thomasl

web :