Skip to content
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 initialization of string with pre-cached slices #5389

Merged
merged 2 commits into from
Oct 31, 2024

Conversation

dubzzz
Copy link
Owner

@dubzzz dubzzz commented Oct 31, 2024

Description

Follow-up of #5388

ChecklistDon't delete this checklist and make sure you do the following before opening the PR

  • The name of my PR follows gitmoji specification
  • My PR references one of several related issues (if any)
    • New features or breaking changes must come with an associated Issue or Discussion
    • My PR does not add any new dependency without an associated Issue or Discussion
  • My PR includes bumps details, please run yarn bump and flag the impacts properly
  • My PR adds relevant tests and they would have failed without my PR (when applicable)

Advanced

  • Category: ⚡️ Improve performance
  • Impacts: Faster init of string arbitrary

Copy link

changeset-bot bot commented Oct 31, 2024

🦋 Changeset detected

Latest commit: 53df97d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
fast-check Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@dubzzz
Copy link
Owner Author

dubzzz commented Oct 31, 2024

Performance results:

│ 45      │ 'Property(fc.string()) on fast-check@3.21.0'                                                                            │ '4,589'  │ 217911.63999965647 │ '±9.63%'  │ 100     │
│ 46      │ 'Property(fc.string()) on fast-check@3.22.0'                                                                            │ '4,078'  │ 245189.8099994287  │ '±10.94%' │ 100     │
│ 47      │ 'Property(fc.string()) on fast-check@main'                                                                              │ '4,359'  │ 229391.56999898842 │ '±11.29%' │ 100     │
│ 48      │ 'Property(fc.string()) on fast-check@extra'                                                                             │ '4,190'  │ 238614.56999904476 │ '±10.12%' │ 100     │
│ 49      │ '—'                                                                                                                     │ '—'      │ '—'                │ '—'       │ '—'     │
│ 50      │ "Property(fc.constant('').chain(() => fc.string())) on fast-check@3.21.0"                                               │ '1,134'  │ 881218.4400021215  │ '±5.74%'  │ 100     │
│ 51      │ "Property(fc.constant('').chain(() => fc.string())) on fast-check@3.22.0"                                               │ '255'    │ 3911387.2999991872 │ '±15.83%' │ 100     │
│ 52      │ "Property(fc.constant('').chain(() => fc.string())) on fast-check@main"                                                 │ '352'    │ 2836993.280001916  │ '±4.67%'  │ 100     │
│ 53      │ "Property(fc.constant('').chain(() => fc.string())) on fast-check@extra"                                                │ '2,097'  │ 476759.8899989389  │ '±13.32%' │ 100     │

Full details at https://github.com/dubzzz/fast-check-benchmarks/actions/runs/11620372383

Copy link

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 53df97d:

Sandbox Source
@fast-check/examples Configuration

Copy link
Contributor

👋 A preview of the new documentation is available at: http://6723fb603963d749ce6ccafc--dubzzz-fast-check.netlify.app

Copy link

codecov bot commented Oct 31, 2024

Codecov Report

Attention: Patch coverage is 83.67347% with 8 lines in your changes missing coverage. Please review.

Project coverage is 95.23%. Comparing base (16377a8) to head (53df97d).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
packages/fast-check/src/utils/globals.ts 71.42% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5389      +/-   ##
==========================================
- Coverage   95.29%   95.23%   -0.06%     
==========================================
  Files         235      235              
  Lines       10519    10562      +43     
  Branches     2804     2816      +12     
==========================================
+ Hits        10024    10059      +35     
- Misses        495      503       +8     
Flag Coverage Δ
unit-tests 95.23% <83.67%> (-0.06%) ⬇️
unit-tests-18.x-Linux 95.23% <83.67%> (-0.06%) ⬇️
unit-tests-20.x-Linux 95.23% <83.67%> (-0.06%) ⬇️
unit-tests-22.x-Linux 95.23% <83.67%> (-0.06%) ⬇️
unit-tests-latest-Linux 95.23% <83.67%> (-0.06%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dubzzz dubzzz merged commit 837548f into main Oct 31, 2024
71 of 73 checks passed
@dubzzz dubzzz deleted the cached-slices branch October 31, 2024 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant