lua-users home
lua-l archive

Re: Cost of String Comparisons??

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


sohyl siddiqui wrote:
> But I had
read on this list that in lua string comparisons are very cheap, since actually it is just a pointer comparison.
Just wanted to confirm this.
Yes...
I am not very keen on changing the string comparison to integer comparisons since that will mean a lot of work for me that I do not have time for atleast for now. so what do you ppl suggest, should I change or if the performance hit of string comparisons is not that much I could just leave it for another time ?
It's essential to profile before embarking on optimisations, rather
than stabbing in the dark. Check out the Lua wiki for pointers to
a couple of Lua-side code profilers. I can say quite confidently
right now, though, that 'optimizing' your string comparisons is
likely to be a waste of time.
--Adam
--
Adam D. Moss - adam@gimp.org

AltStyle によって変換されたページ (->オリジナル) /