-
Notifications
You must be signed in to change notification settings - Fork 829
Use SmallSet in EffectsAnalyzer #4885
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Here's the benchmarks (edited for readability), script, input wasm and the executables can be found here $ ./run-wasm-opt.sh
wasm-opt-baseline:
real 0m23.973s
wasm-opt-no-set-allocation:
real 0m23.209s
wasm-opt-smallset-10:
real 0m18.224s
wasm-opt-smallset-4:
real 0m17.072s
wasm-opt-smallset-2:
real 0m17.087s
wasm-opt-smallset-1:
real 0m17.584s
wasm-opt-smallset-0:
real 0m19.192s
---------------Here are a couple of culprits: Where with The rest of the code may be way less effected by that one allocation, if they drown out the improvement there by allocating many times later by exceeding the small size, and also the optional overhead might weigh in way more here. Please also note that this benchmark is heavily biased to the way Wonderland Engine writes code (which is a non-standard flavor over heavily optimized data-oriented C++) and probably not representative of "the average C++ wasm". You may want to run the benchmarks with other .wasm input to test. All in all, @kripken, I'm considering wheter it wouldn't make sense to revert the changes to |
|
Thanks! Ok, I did some benchmarking on a UE4 game, a Dart benchmark, and Poppler, all on Linux. Raw times are noisy but the instruction counts from
(runtimes are generally similar to these numbers). Looks like I also lean towards changing So I suggest we land #4884 and then land this but with |
4868e73 to
3561859
Compare
|
@kripken Sounds great! I updated this PR to use |
3561859 to
5ba07b5
Compare
|
Rebased onto the changes to #4884 ! |
4a043b0 to
4b0774d
Compare
|
Rebased onto the changes to #4884 once again, which should also fix the test case that was failing over there. Also noticed I had apparently missed two sets that were still on 10 instead of 1 element. Hope that wasn't just my faulty memory and it was intended to keep those different for some reason. |
a96f0b9 to
491f1ff
Compare
Signed-off-by: Squareys <squareys@googlemail.com>
Signed-off-by: Squareys <squareys@googlemail.com>
…t does Signed-off-by: Squareys <squareys@googlemail.com>
Signed-off-by: Squareys <squareys@googlemail.com>
491f1ff to
7ce6281
Compare
|
Rebased onto the changes to #4884 ! |
Hi @kripken & @sbc100 !
As promised in #4884, this is split off into it's own PR.
For it to have any effect, though, it still depends on avoiding the default constructor allocation, implemented in that other PR.
Benchmarks for the SmallSet template argument following in short.
Best,
Jonathan