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

Close #268 - refactored entire benchmark program for TypeBox #277

Merged
merged 4 commits into from
Oct 28, 2022

Conversation

samchon
Copy link
Owner

@samchon samchon commented Oct 28, 2022

@sinclairzx81 Refactored entire benchmark program and it would be very suitable for TypeBox.

Especially, concentrated on assertType() function and make it to occurs type error always. As you know, if assert only one object, measurement result would be weirdo because property access sequence of validator libraries are all different. Therefore, target values for the assertType() benchmark are wrapped by an Array.

@samchon samchon added the enhancement New feature or request label Oct 28, 2022
@samchon samchon self-assigned this Oct 28, 2022
@samchon samchon merged commit 5821093 into v3.3 Oct 28, 2022
@sinclairzx81
Copy link
Contributor

@samchon Awesome!

Yeah, happy to see heaps of error data run for the assert test (as that would run invoke both .Check() and .Errors() and be a more comparable test overall). It think having error cases would also be able to highlight validation disparities across the libraries being run (which is a good REALLY good thing to help encourage validation alignment)

Nice work!

PS: You should totally consider setting up these benchmarks as a standalone project. Currently, only https://github.com/moltar/typescript-runtime-type-benchmarks exists in this space, and it only asserts on simple structures, and only for passing test cases. It also doesn't make distinctions between AOT, JIT and Dynamic validation. So there's room for innovation there.

Would be an awesome reference point for developers.

@samchon
Copy link
Owner Author

samchon commented Oct 28, 2022

I'll make a new PR and will show how benchmark result has been changed.

Especially, the new benchmark program is extremely optimized for the JIT environment.

Therefore, dramatic enhancement on your TypeBox would be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants