[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: LuaJIT string concat
- From: Pierre-Yves Gérardy <pygy79@...>
- Date: Wed, 13 Apr 2011 22:59:29 +0200
Arrgh... Damn gmail and its reply to all feature...
2011/4/13 H. Diedrich <hd2010@eonblast.com>:
> Can I possibly see the benchmark code?
Here you are:
local sformat, rnd, tostring, a =
string.format, math.random, tostring, nil
for i= 1,10000000 do
a = sformat( "[%s]", tostring(rnd()) )
-- a = "["..tostring(rnd).."]"
end
As I told you earlier, I removed table.concat from the benchmark since
it was a constant factor, likely to dominate the benchmark. I added
tostring(rnd()), though to trigger string interning at each iteration,
but, now that I think of it, I could probably have used a constant
string... I was affraid that LuaJIT would do some magic and yank out
some constant code, but I didn't test this hypothesis...
-- Pierre-Yves
- References:
- LuaJIT string concat, Henning Diedrich
- Re: LuaJIT string concat, Francesco Abbate
- Re: LuaJIT string concat, Alexander Gladysh
- Re: LuaJIT string concat, Francesco Abbate
- Re: LuaJIT string concat, Peter Cawley
- Re: LuaJIT string concat, Francesco Abbate
- Re: LuaJIT string concat, steve donovan
- Re: LuaJIT string concat, Henning Diedrich
- Re: LuaJIT string concat, Pierre-Yves Gérardy
- Re: LuaJIT string concat, Pierre-Yves Gérardy