AssemblyScript / examples

A collection of AssemblyScript examples.
https://assemblyscript.org
MIT License
283 stars 50 forks source link

Update n-body #8

Closed MaxGraey closed 1 year ago

dcodeIO commented 3 years ago

For comparison:

COLD SERIES:

Performing 20000000 steps (AssemblyScript WASM) ...
Took 1515.6276ms
Performing 20000000 steps (AssemblyScript JS) ...
Took 2409.551ms
Performing 20000000 steps (JS) ...
Took 1826.1667ms
Performing 20000000 steps (Rust WASM) ...
Took 1542.6844ms

WARMED UP SERIES:

Performing 20000000 steps (AssemblyScript WASM) ...
Took 1518.5098ms
Performing 20000000 steps (AssemblyScript JS) ...
Took 2383.6588ms
Performing 20000000 steps (JS) ...
Took 1806.5908ms
Performing 20000000 steps (Rust WASM) ...
Took 1542.4533999999999ms
MaxGraey commented 3 years ago

could we merge this?

dcodeIO commented 3 years ago

Do you have a suspicion why it is slower now? Given that it still uses the stub runtime (no GC, no shadow stack), that rather looks like a regression unrelated to the latest changes.

MaxGraey commented 3 years ago

wasm module hasn't changed at all. So perhaps it's slightly slower due to some v8 regressions