Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Benchmark.js fixed overhead for setup functions #234

Open
OliverNChalk opened this issue Sep 15, 2020 · 1 comment
Open

Benchmark.js fixed overhead for setup functions #234

OliverNChalk opened this issue Sep 15, 2020 · 1 comment

Comments

@OliverNChalk
Copy link

Any function passed into new Benchmark(options.setup) will result in a considerable drop in tested function performance. It appears to be a fixed overhead unrelated to what is actually done in the setup function. Here are typescript and javascript examples reproducing the problem.

4423.295430464231 ops/s Custom Test Runner
4815.623863547339 ops/s NoSetup (benchmark.js)
4267.906011630515 ops/s DeclaredSetup (benchmark.js)
4278.495863955272 ops/s AssignedSetup (benchmark.js)
@Uzlopak
Copy link

Uzlopak commented Mar 9, 2022

I will have a look at it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants