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 array parsing #2159

Closed
wants to merge 1 commit into from
Closed

Conversation

tmcw
Copy link
Contributor

@tmcw tmcw commented Mar 7, 2023

This is kind of experimental and unfortunately not a huge boost, but basically: eeking 5% extra perf out of array parsing by avoiding the overhead of creating and mapping an intermediate value. Currently is only for sync parsing. Refs #205

➜  zod git:(faster-array-parsing) y benchmark --realworld
yarn run v1.22.19
$ tsx src/benchmarks/index.ts --realworld
realworld: valid x 7,308 ops/sec ±0.13% (100 runs sampled)
✨  Done in 5.78s.
➜  zod git:(faster-array-parsing) y benchmark --realworld
yarn run v1.22.19
$ tsx src/benchmarks/index.ts --realworld
realworld: valid x 7,383 ops/sec ±0.12% (98 runs sampled)
✨  Done in 5.62s.
➜  zod git:(faster-array-parsing) y benchmark --realworld
yarn run v1.22.19
$ tsx src/benchmarks/index.ts --realworld
realworld: valid x 7,326 ops/sec ±0.13% (100 runs sampled)
✨  Done in 5.63s
➜  zod git:(master) y benchmark --realworld
yarn run v1.22.19
$ tsx src/benchmarks/index.ts --realworld
realworld: valid x 7,031 ops/sec ±0.12% (99 runs sampled)
✨  Done in 5.67s.
➜  zod git:(master) y benchmark --realworld
yarn run v1.22.19
$ tsx src/benchmarks/index.ts --realworld
realworld: valid x 7,040 ops/sec ±0.13% (98 runs sampled)
✨  Done in 5.67s.
➜  zod git:(master) y benchmark --realworld
yarn run v1.22.19
$ tsx src/benchmarks/index.ts --realworld
realworld: valid x 7,023 ops/sec ±0.13% (99 runs sampled)
✨  Done in 5.70s

@netlify
Copy link

netlify bot commented Mar 7, 2023

Deploy Preview for guileless-rolypoly-866f8a ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 900bd26
🔍 Latest deploy log https://app.netlify.com/sites/guileless-rolypoly-866f8a/deploys/64074e9f985bf60008ceb90c
😎 Deploy Preview https://deploy-preview-2159--guileless-rolypoly-866f8a.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@stale
Copy link

stale bot commented Jun 8, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale No activity in last 60 days label Jun 8, 2023
@stale stale bot closed this Jul 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale No activity in last 60 days
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant