edin / raytracer

Performance comparison of various compilers
MIT License
57 stars 22 forks source link

Add WebAssembly test with a little bit macro changes in RayTracer.c. #31

Closed wxfred closed 2 years ago

wxfred commented 2 years ago

In my computer, c version is completed in 31ms, and its webassembly version costs 38ms with -O3 and 43ms with -O1. Expect you to test and update the running time on your computer. By the way, the javascript version needs 140ms (node 14).

ps:

  1. Install Emscripten
  2. Add emsdk folder to your system env variables
  3. Run the build.ps1 on PowerShell
  4. Open the output html file on your Chrome