summaryrefslogtreecommitdiff
path: root/src/tools/wasm-ctor-eval.cpp
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2021-09-29 13:28:51 -0700
committerGitHub <noreply@github.com>2021-09-29 13:28:51 -0700
commit6b715407b96d270a5242871bb2ba680566ed304b (patch)
tree6304cbfe1f034db4a6197586514bb19e9a182183 /src/tools/wasm-ctor-eval.cpp
parent6b80ef6cccfd14b9b6620c5d41a148024d78576c (diff)
downloadbinaryen-6b715407b96d270a5242871bb2ba680566ed304b.tar.gz
binaryen-6b715407b96d270a5242871bb2ba680566ed304b.tar.bz2
binaryen-6b715407b96d270a5242871bb2ba680566ed304b.zip
Add a SmallSet and use it in LocalGraph. NFC (#4188)
A SmallSet starts with fixed storage that it uses in the simplest possible way (linear scan, no sorting). If it exceeds a size then it starts using a normal std::set. So for small amounts of data it avoids allocation and any other overhead. This adds a unit test and also uses it in LocalGraph which provides a large amount of additional coverage. I also changed an unrelated data structure from std::map to std::unordered_map which I noticed while doing profiling in LocalGraph. (And a tiny bit of additional refactoring there.) This makes LocalGraph-using passes like ssa-nomerge and precompute-propagate 10-15% faster on a bunch of real-world codebases I tested.
Diffstat (limited to 'src/tools/wasm-ctor-eval.cpp')
0 files changed, 0 insertions, 0 deletions