文字列結合のベンチマークをいろんな処理系でやってみた
- 2. HTML
5 × 20 × 10
3
Mac OS X 10.6, Core2 Duo 2GHz
http://bit.ly/pNNmGY
- 3. LuaJIT (2.0.0-b8)
PHP (5.3.6)
Perl (5.12.1)
Lua (5.1.4)
Python (3.2.1)
Rubinius (1.2.4)
Go (6g r57.2)
Ruby (1.9.2-p290)
0 40000 80000
- 4. g++ (4.2.6)
Java (1.6.0_26)
PyPy (1.6.0)
LuaJIT (2.0.0-b8)
PHP (5.3.6)
Perl (5.12.1)
Lua (5.1.4)
Python (3.2.1)
Rubinius (1.2.4)
Go (6g r57.2)
Ruby (1.9.2-p290)
0 40000 80000 120000 160000
- 5. g++ (4.2.6)
Java (1.6.0_26)
PyPy (1.6.0)
LuaJIT (2.0.0-b8)
PHP (5.3.6)
Perl (5.12.1)
Lua (5.1.4)
Python (3.2.1)
Rubinius (1.2.4)
Go (6g r57.2)
Ruby (1.9.2-p290)
0 40000 80000 120000 160000 200000 240000 280000 320000
- 6. g++ (4.2.6)
Java (1.6.0_26)
PyPy (1.6.0)
LuaJIT (2.0.0-b8)
PHP (5.3.6)
Perl (5.12.1)
Lua (5.1.4)
Python (3.2.1)
Rubinius (1.2.4)
Go (6g r57.2)
Ruby (1.9.2-p290)
- 7. Node.js (0.5.4)
g++ (4.2.6)
Java (1.6.0_26)
PyPy (1.6.0)
LuaJIT (2.0.0-b8)
PHP (5.3.6)
Perl (5.12.1)
Lua (5.1.4)
Python (3.2.1)
Rubinius (1.2.4)
Go (6g r57.2)
Ruby (1.9.2-p290)
0 500000 1000000 1500000 2000000
- 8. 1
2
(Tracing JIT)
Node.js 0.5.1
- 9. Node.js (0.5.4)
g++ (4.2.6)
Java (1.6.0_26)
PyPy (1.5.0-a0)
LuaJIT (2.0.0-b8)
PHP (5.3.6)
Perl (5.12.1)
Lua (5.1.4)
Python (3.2.1)
Rubinius (1.2.4)
Go (6g r57.2)
Ruby (1.9.2-p290)
0 50000 100000 150000 200000 250000
- 10. Tenjin (node.js)
Tenjin (perl)
Tenjin (php)
Tenjin (ruby)
Tenjin (python)
0 10000 20000 30000 40000
- 11. Node.js (0.5.4)
g++ (4.2.6)
Java (1.6.0_26)
PyPy (1.5.0-a0)
LuaJIT (2.0.0-b8)
PHP (5.3.6)
Perl (5.12.1)
Lua (5.1.4)
Python (3.2.1)
Rubinius (1.2.4)
Go (6g r57.2)
Ruby (1.9.2-p290)
0 50000 100000 150000 200000 250000
- 12. Node.js (0.5.4)
g++ (4.2.6)
Java (1.6.0_26)
PyPy (1.5.0-a0)
LuaJIT (2.0.0-b8)
PHP (5.3.6)
Perl (5.12.1)
Lua (5.1.4)
Python (3.2.1)
Rubinius (1.2.4)
Go (6g r57.2)
Ruby (1.9.2-p290)
0 50000 100000 150000 200000 250000
- 13. g++: std::string
Java: StringBuilder + toString()
Java: StringBuilder w/o toString()
0 50000 100000 150000 200000 250000
- 14. list.append() Python (3.2.1)
append()
list.extend()
extend()
extend()+str()
buf[-1:] = ()
StringIO.write()
0 20000 40000 60000 80000 100000
list.append() PyPy (1.6.0)
append()
list.extend()
extend()
extend()+str()
buf[-1:] = ()
StringIO.write()
0 20000 40000 60000 80000 100000