-
Notifications
You must be signed in to change notification settings - Fork 11
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
Results can be a bit misleading, as they show the sum of the executions #1
Comments
Also https://v8.dev/blog/cost-of-javascript-2019#json suggests:
I tried to change the tests to 80kB where I got results around 23.5 ms for both, which seems to be the startup time of v8. (empty realm file yields same result). How would one go and do a proper benchmark with such a small file? |
I have now executed 2000 runs on an 80kb file, see #2 And I created a file as a baseline. I have only run it against:
So to parse and execute, it takes 21.69 milliseconds, let's us that as a baseline. JS literal takes: 27.133 milliseconds and JSON.parse: 25.918 milliseconds. The pure parsing time should then roughly be:
So |
I don't think the README suggests an 8-second improvement in any way. It explicitly points out how the measurements are taken (i.e. 100 Btw, I noticed that you're only testing in V8 v7.5. If you pick only a single V8 version to test in, it should probably be the latest one (currently v7.7). Note that V8 v7.6 had significant |
I know it doesn't say that, but looking at the README, the first thing that jumps to the eye is the table. If I were to present data like this in another context, it would look odd as well: Travel times from Leipzig -> Berlin (200km), benchmarked a 100 times:
vs
I guess, what I am saying is: I am just used that if you create a benchmark or statistic, you normalize it to the individual, you'd also never say: This group of a 100 people is 6720 years old vs this group who is 6540 years old 😉 |
@mathiasbynens Thank you for the great work, I learned a lot:
jsvu
, didn't know about that one.But I have a question regarding methodology. Currently timings are the aggregated results for the hundred runs, e.g.
So that means, that the stats from the README:
could also read:
So it takes V8 v7.5 either 157 or 237 _milli_seconds for parsing a 8 megabyte file. This is an impressive feature, but one would save "only" 80ms vs the 8 seconds as the README suggests.
The text was updated successfully, but these errors were encountered: