[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.2.1 (work1) now available
- From: Roberto Ierusalimschy <roberto@...>
- Date: Sun, 25 Mar 2012 14:09:07 -0300
> Intern on first compare is not easy to implement, there are a lot of
> complications. A quick-and-dirty attempt at using long string hash
> values to avoid extra memcmp() work didn't really work (a few %
> slower than default lua-5.2.1wk1) because in the examples I am
> using, there are a lot of equal compares (76%) which means memcmp()
> is still mostly needed. Short string compares is still much faster.
A possible small optimization is to check whether "a == b" in
'luaS_eqlngstr', before doing the memcmp.
-- Roberto