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

Add Valibot to benchmarks #33

Merged
merged 2 commits into from
Feb 14, 2024
Merged

Add Valibot to benchmarks #33

merged 2 commits into from
Feb 14, 2024

Conversation

nakrovati
Copy link
Contributor

@nakrovati nakrovati commented Feb 14, 2024

🔗 Linked issue

❓ Type of change

  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

I added Valibot to the benchmarks and at the same time fixed the yup import.

===============================
Benchmarking with flat object
===============================
Vine x 13,868,974 ops/sec ±0.74% (83 runs sampled)
Zod x 1,253,634 ops/sec ±1.14% (85 runs sampled)
Yup x 529,423 ops/sec ±0.39% (90 runs sampled)
Valibot x 5,900,226 ops/sec ±0.18% (92 runs sampled)
Fastest is Vine
=================================
Benchmarking with nested object
=================================
Vine x 11,853,163 ops/sec ±0.37% (89 runs sampled)
Zod x 595,314 ops/sec ±0.39% (91 runs sampled)
Yup x 232,332 ops/sec ±0.53% (90 runs sampled)
Valibot x 3,380,880 ops/sec ±3.33% (84 runs sampled)
Fastest is Vine
======================
Benchmarking arrays
======================
Vine x 8,653,099 ops/sec ±0.99% (85 runs sampled)
Zod x 391,763 ops/sec ±2.16% (84 runs sampled)
Yup x 129,500 ops/sec ±0.80% (86 runs sampled)
Valibot x 2,698,201 ops/sec ±2.67% (78 runs sampled)
Fastest is Vine
=======================
Benchmarking unions
=======================
Vine x 10,739,323 ops/sec ±0.67% (85 runs sampled)
Zod x 187,938 ops/sec ±0.85% (88 runs sampled)
Valibot x 2,530,935 ops/sec ±0.16% (91 runs sampled)
Fastest is Vine

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

Use the namespace to import yup, since yup did not have a default export
and this caused `ts(1192)` errors.
@RomainLanz RomainLanz merged commit f94d274 into vinejs:develop Feb 14, 2024
6 checks passed
@RomainLanz
Copy link
Member

Thanks!

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.

None yet

2 participants