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 |
15 minutes is surprisingly slow, but
--debugis expected to be fairly slow, as it does heavy validation and debugging-helping operations. Perhaps we should have an option to get timing info without that. But, the timing info ignores the validation overhead.