Commit Graph

3 Commits

Author SHA1 Message Date
Arseny Kapoulkine ec52f6b228 js: Switch to -msimd128
This change switches to using -msimd128 compile flags instead of
-munimplmemented-simd128.

The reason for the switch is that in general, compiling with
-munimplemented-simd128 is asking for trouble, as it may generate
instructions that Chrome doesn't understand yet.

We've been carefully avoiding the issues so far, but at this point
-msimd128 supports all but one (swizzle) instruction that we need.

This change explicitly marks the function chain in vertex codec as using
unimplemented-simd128 (you need to mark the chain to enable inlining),
which generates more or less the same code.

The benefit is that codecbench-simd.js can now be ran in Chrome/v8!

Also switch to emscripten_get_now to get more precise timer than
clock().
2020-02-16 18:10:03 -08:00
Arseny Kapoulkine 06a1d2b787 tools: Update codecbench to make it easier to run
make codecbench.wasm now builds a standalone .wasm executable. This
change also disables memory growth to make sure that we have the minimum
number of imports.
2020-02-12 21:42:59 -08:00
Arseny Kapoulkine 7d5833ac2a tools: Add codec benchmark
This code can be used to benchmark native vs .js implementations of
vertex codec (and, in the future, vertex filters).

Note: right now the SIMD variant of the JS benchmark doesn't run because
compiler generates some instructions that Chrome doesn't support...
2020-02-11 21:07:42 -08:00