[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Cost of String Comparisons??
- From: "Adam D. Moss" <adam@...>
- Date: Mon, 04 Apr 2005 13:58:39 +0100
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.
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 D. Moss - email@example.com