-
Notifications
You must be signed in to change notification settings - Fork 16
Object instantiation benchmark tests #1
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
Comments
Not sure we should waste time on testing |
|
Would be nice to have. It has more up-to-date V8 version. |
@aqrln it's strange but create empty
|
Oh, it seems that gc influences test significantly, adding
|
@tshemsedinov I'd also check the IR to see how V8 compiles it. Microbenchmarks are very tricky to get done right. |
But the fact is that they have become fast and will often win between competitors. That's a good news for me, I ❤️ mixins, you know. |
Another strange case that |
@tshemsedinov not necessarily they, that might as well be new optimizations that just eat your benchmarked functions and leave only little crumbs :) If https://github.com/HowProgrammingWorks/Benchmark/blob/master/JavaScript/3-instantiation.js is the benchmark you are talking about, I'd definitely check out the compiled code before making any conclusions. From what I see, after inlining benchmarked functions, there will be lots of loop invariants that V8 usually pulls out of the loop, so many of these tests most probably benchmark nothing. |
I'd also recommend you to check out this video or other talks by Vyacheslav Egorov, one of the V8 developers. Spoiler: due to how V8 works, the best way to write microbenchmarks is to never write microbenchmarks, but if you absolutely must do so, there are certain techniques that should be used and certain situation you have to be aware of. |
Prepare execution scripts and run tests with different parameters:
That's your task @NikitaRodan
The text was updated successfully, but these errors were encountered: