lua-users home
lua-l archive
Re: LuaJIT string concat
[
Date Prev
][
Date Next
][
Thread Prev
][
Thread Next
] [
Date Index
] [
Thread Index
]
Subject
:
Re: LuaJIT string concat
From
: Henning Diedrich <hd2010@
...
>
Date
: 2011年4月13日 16:25:37 +0200
On 4/13/11 3:46 PM, steve donovan wrote: [
Well, I think by now we are all eager: where are the numbers?
I tested something like this -- not sure how accurate that is but it shows a tendency
lower Y means: faster
Lua 5.1 official
----------------------------------------------------------------------------o-
x=[1..100] elements in t[i] = 'abc' .. i
+: '[' .. table.concat(t) .. ']'
x: string.format('[%s]', table.concat(t))
----------------------------------------------------------------------------o-
nsec/element -=xXx=- '..' and string.format()
550 |:
530 |:x
510 |:
490 |:
470 |:
450 |:
430 |:
410 |:
390 |:
370 |:+x
350 |:
330 |:
310 |: x
290 |:
270 |: +
250 |: x
230 |: + x
210 |: x
190 |: + xx
170 |: ++ xx
150 |: ++ x
130 |: +++***xxxxx
110 |: +++++**********xx*xxxxxxxxxx xx
90 |: ++ ++++++++++**++*** +: [103..384] x: [107..548]
70 |:
50 |:
30 |:
10 |:
0 |:_________________________________________________
elements: ^1 ^20 ^40 ^60 ^80
x=1 +: 810; x: 1267
Lua 5.1 official - Luabench 0.3.0
----------------------------------------------------------------------------o-
x=[1..100] elements in t[i] = randstr 1 - 200 chars
+: '[' .. table.concat(t) .. ']'
x: string.format('[%s]', table.concat(t))
----------------------------------------------------------------------------o-
nsec/element -=xXx=- '..' and string.format()
660 |:
640 |:x
620 |:
600 |:
580 |:
560 |:
540 |:
520 |:+
500 |:
480 |: x
460 |:
440 |:
420 |: x
400 |: +
380 |:
360 |: x x xx x
340 |: x+ x x x x x x x
320 |: +xx xxxxx x xx x x x+ x xx xx x [295..652]
300 |: + +++ x xx +x+ + +xxxx x xx xx
280 |: ++x+ + ++++ + + + + ++ +++++++++++ [259..537]
260 |: + +++ +++ + ++
240 |: +
... |..................................................
elements: ^1 ^20 ^40 ^60 ^80
x=1 +: 1227.9; x: 1519.5
Henning
Follow-Ups
:
Re: LuaJIT string concat
,
Pierre-Yves Gérardy
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
Prev by Date:
Re: LuaJIT string concat
Next by Date:
Re: [ANN] lqt 0.9
Previous by thread:
Re: LuaJIT string concat
Next by thread:
Re: LuaJIT string concat
Index(es):
Date
Thread
AltStyle
によって変換されたページ
(->オリジナル)
/
アドレス:
モード:
デフォルト
音声ブラウザ
ルビ付き
配色反転
文字拡大
モバイル