ColinEberhardt / assemblyscript-regex

A regex engine for AssemblyScript
MIT License
86 stars 12 forks source link

Use optimized.wasm for benchmarks #23

Closed MaxGraey closed 3 years ago

ColinEberhardt commented 3 years ago

When I checkout this branch and run the benchmarks I get the following error:

$ npm run benchmark 

> assemblyscript-regex@0.1.0 benchmark /Users/colineberhardt/Projects/as-regex
> node benchmark/benchmark.js

baseline x 164,886 ops/sec ±1.06% (84 runs sampled)
character class x 51,039 ops/sec ±1.73% (86 runs sampled)
concatenation x 12,879 ops/sec ±2.32% (82 runs sampled)
quantifiers x 21,795 ops/sec ±1.25% (84 runs sampled)
range quantifiers x 6,769 ops/sec ±1.28% (84 runs sampled)
alternation x 24,127 ops/sec ±7.89% (80 runs sampled)
wasm://wasm/0001383e:9

RuntimeError: unreachable
    at wasm-function[8]:107
    at wasm-function[9]:13
    at wasm-function[10]:34
    at wasm-function[22]:7
    at wasm-function[98]:61
    at wasm-function[99]:513
    at wasm-function[101]:39
    at curr.(anonymous function).args (/Users/colineberhardt/Projects/as-regex/node_modules/@assemblyscript/loader/umd/index.js:471:20)
    at executeRegex (/Users/colineberhardt/Projects/as-regex/benchmark/benchmark.js:31:3)
    at Benchmark.suite.add.add.add.add.add.add.add (/Users/colineberhardt/Projects/as-regex/benchmark/benchmark.js:63:5)

Does it work for you?

MaxGraey commented 3 years ago

hmm, I don't test yet. Did you try compile with --runtime stub instead default --runtime full?