State of Benchmark · Issue #1 · webpro/webpro.nl · GitHub
Skip to content

State of Benchmark #1

Closed
Closed

Description

@H4ad

Hey, I liked your article but I think you could include more information to make it a reference when we talk about available benchmark tools on Node.

I don't know if you didn't add more benchmarks because you don't know them or if it was intentional but I was doing the research to include the benchmark module on Node and I used this repository to compare the benchmarks: https://github.com/H4ad/benchmarks-comparisons.

You can run run.sh and you will have a lot of log files for each benchmark multiple times, which you can use to compare different tools. Some of them are more accurate and some of them are too noisy for some benchmarks (eg: tinybench). I also added inside that issue of introducing benchmark module on node a table comparing the different features, maybe could be interesting for you.

I'm also working on another benchmark with @RafaelGSS that was the initial proposal to include on Node, you can find it at https://github.com/RafaelGSS/bench-node (currently not available on npm).

This new benchmark may have a memory heap report like isitfast, with an output like:

create empty circuit x 242,837 ops/sec +/- 0.12% (8 runs sampled) heap usage=3.05Kb (3.02Kb ... 3.09Kb) min..max=(3.65us ... 5.01us) p75=4.41us p99=5.01us

Let me know if you have any questions about one of these benchmarks, or feel free to close this issue if you think this is unnecessary.

Activity

  1. webpro commented on Dec 23, 2023

    @webpro
    Owner

    Thanks, @H4ad!

    Here's what I did (not) find when writing the article:

    • Search for "benchmark" on npm and cronometro and isitfast are not on the first two (maybe more) pages of search results, so I completely missed those. Guess they should add some keywords to improve discoverability.
    • I saw mitata (and Bema, built on top of Benchmark.js) at the end of the tinybench readme, but my impression was they don't seem well-maintained?
    • The rest I saw and is mentioned in the article.

    Only now I see your comprehensive table - no idea how I missed that. It's super interesting! Helps a lot.

    So, based on your reply and the table:

    • My article should definitely add/link to https://github.com/RafaelGSS/bench-node, right?
    • Same for cronometro and isitfast (while mentioning their isolation in worker feature) - wow, isitfast looks like a classic case of "don't judge a book by it's cover" (v0.0.8, zero downloads, commit messages put me off, etc), but interesting/promising project!
    • jsperf.dev (which I did link to in the article), looks unused, even abandoned (https://jsperf.dev is down). It's not in your benchmark table/comparison either. Perhaps should remove that one as it might confuse people. Maybe @Ethan-Arrowood can shine a light on the future of this project?

    @H4ad WDYT? Based on your feedback, when I have some more time (after Christmas), I plan to update the article.

  2. Ethan-Arrowood commented on Dec 23, 2023

    @Ethan-Arrowood

    I'm also away for the holidays, but jsperf.dev is definitely stagnated. I simply ran out of motivation to keep working on it when I realized there was little to gain from generalized benchmarking. I'm a big fan of open telemetry now and if I was to work on jsperf again I would most likely have it integrate directly with OT.

    Let me know if there's any other context about the project. Happy holidays ❄️

  3. webpro commented on Dec 23, 2023

    @webpro
    Owner

    Thanks for the quick reply, Ethan. Wish you all the best 🎄☃️

  4. H4ad commented on Dec 24, 2023

    @H4ad
    Author

    About maintainability, I think all of them (except tinybench) lack a little bit about that, but I think those libraries didn't take too much maintenance effort since once you finish it, you will have too much to change.

    One curiosity, I think the implementation of deno was based on mitata because of this file on deno and this file on mitata, and the output of both are very similar.

    About isitfast, the author has plans to start to work again on it in the next year (the new API/version looks interesting too), and I got the idea of benchmarking the memory from this library, so at least give a mention about their innovation (besides is not production ready).

    My article should definitely add/link to https://github.com/RafaelGSS/bench-node, right?

    Yes, our idea is to attract more ideas and feedback about it, try to make that benchmark battle-tested, and then in the future use that lib as the foundation for the node:benchmark module.

    About jsperf.dev, it was suggested to me but I forgot about that during the research, so that's why I didn't include it. Their implementation looks a little bit similar to the new implementation of isitfast, which I think was too exotic compared to the other benchmarks, although I think that implementation helps with isolation and probably makes it very easy to introduce workers like cronometro.

    About that feature comparison table, let me know if you don't understand the terms I use.

  5. webpro commented on Dec 24, 2023

    @webpro
    Owner

    Thanks a lot for all the feedback and info, @H4ad. Let me know if you like the updated article better, but happy to hear any more feedback you may have!

  6. added a commit that references this issue on Dec 24, 2023
    c100a0b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions