Successfully reported this slideshow.

AObench with Emscripten

2,152 views

Published on

  • Be the first to comment

AObench with Emscripten

  1. 1. emscripten aobenchMonday, January 24, 2011
  2. 2. Agenda • emscripten • aobench • • Performance •Monday, January 24, 2011
  3. 3. emscripten • C/C++ -> JavaScript compiler • LLVM IR JS • clang, llvm-gcc C/C++ LLVM IR .Monday, January 24, 2011
  4. 4. aobench • AmbientOcclusion , CG • .Monday, January 24, 2011
  5. 5. • raytrace . • clang LLVM IR • emscripten LLVM IR -> JS • webMonday, January 24, 2011
  6. 6. • • compile , js . • ... • Firebug .Monday, January 24, 2011
  7. 7. include file • #include “emscripten.h” • C/C++Monday, January 24, 2011
  8. 8. • rand() . • • -> ( ?) xorshiftMonday, January 24, 2011
  9. 9. double *pixels = new double[3 * x]; @llvm.umul.with.overflow.i64 ->Monday, January 24, 2011
  10. 10. optimize • opt -std-compile-opts LLVM IR . • ...Monday, January 24, 2011
  11. 11. js code • JS var args = arguments; // arguments . // var args = []Monday, January 24, 2011
  12. 12. Performance Chrome Firefox 90 • Chrome 12.8 secs 67.5 • Firefox 82.92 secs 45 • Safari ... 22.5 0 secsMonday, January 24, 2011
  13. 13. Closure compiler • Closure compiler(JS -> JS optimizer) JS .Monday, January 24, 2011
  14. 14. • JS JS . • C JS . • LLVM IR • lowlevelMonday, January 24, 2011

×