Built with -O2
and run with bin\wasm-opt banana.wast -O --debug
.
linear search + hand-written move (original)
Test | coalesce-locals | Total |
---|---|---|
1 | 3.43754 | 7.40638 |
2 | 3.57819 | 7.96062 |
avg | 3.507865 | 7.6835 |
std::lower_bound + hand-written move
Test | coalesce-locals | Total |
---|---|---|
1 | 3.53688 | 7.53702 |
2 | 3.41175 | 7.2713 |
3 | 3.32817 | 7.38682 |
avg | 3.4256 | 7.39838 |
std::lower_bound + std::move + std::move_backward
Test | coalesce-locals | Total |
---|---|---|
1 | 3.28129 | 7.43767 |
2 | 3.30874 | 7.2682 |
3 | 3.26425 | 7.42072 |
avg | 3.28476 | 7.37553 |
For some reason I do not understand,
<chrono>
is not working properly for me. Each test actually took me about 15 minutes to run, butwasm-opt
reported it was just 7.x seconds. Probably a mingw-w64 gcc compiler issue rather than the code because I once compiled older version of binaryen with MSVC and the time reported bywasm-opt
is correct. Please only compare the result above relatively.Edit:
I just compiled it with MSVC, same result.