-
-
Notifications
You must be signed in to change notification settings - Fork 175
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
⚡️ Faster implementation for safeApply
#3105
Conversation
Benchmark measurements made at https://github.com/dubzzz/fast-check-benchmarks/blob/main/benchmark-poisoning.js proved that the code for `safeApply` can be speed-up by huge factors if rewritten in a try/catch maner. We measured: - before: from 15,083.692 to 15,573.392 ops/sec - after: from 59,929.287 to 61,058.436 ops/sec On this benchmark. Figures need to be confirmed on fast-check's code but figures looks promising.
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit c859872:
|
Performance measurements for current main 703e44e (aka main) vs 3.1.0 (aka 3.1.0) vs this PR (aka extra): Algorithm;3.1.0;main;extra More details at: https://github.com/dubzzz/fast-check-benchmarks/actions/runs/2960555414 |
Benchmark measurements made at https://github.com/dubzzz/fast-check-benchmarks/blob/main/benchmark-poisoning.js proved that the code for
safeApply
can be speed-up by huge factors if rewritten in a try/catch maner.We measured:
On this benchmark. Figures need to be confirmed on fast-check's code but figures looks promising.
Category:
Potential impacts: