Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

文字列結合のベンチマークをいろんな処理系でやってみた

19,375 views

Published on

LL Planets 2011 Lightning Talk

Published in: Technology

文字列結合のベンチマークをいろんな処理系でやってみた

  1. 1. LL Planet 2011 LT
  2. 2. HTML 5 × 20 × 103Mac OS X 10.6, Core2 Duo 2GHzhttp://bit.ly/pNNmGY
  3. 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. 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. 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. 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. 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. 8. 1 2 (Tracing JIT) Node.js 0.5.1
  9. 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. 10. Tenjin (node.js) Tenjin (perl) Tenjin (php) Tenjin (ruby)Tenjin (python) 0 10000 20000 30000 40000
  11. 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. 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. 13. g++: std::string Java: StringBuilder + toString() Java: StringBuilder w/o toString()0 50000 100000 150000 200000 250000
  14. 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
  15. 15. V8 (+ crankshaft)StringBuilder#toString()JIT

×