moltar / typescript-runtime-type-benchmarks

📊 Benchmark Comparison of Packages with Runtime Validation and TypeScript Support
https://moltar.github.io/typescript-runtime-type-benchmarks/
621 stars 59 forks source link

feat: updates typebox to 0.31.0 #1125

Closed sinclairzx81 closed 1 year ago

sinclairzx81 commented 1 year ago

This PR updates the benchmarks to support TypeBox 0.31.0.

This PR also includes additional benchmarks for TypeBox's other validation options.

These are listed as:

The TypeBox AOT build can be run via npm script using:

$ npm run compile:typebox

Have also included a bit of documentation regarding the assertion policies used by TypeBox in these benchmarks, and the validators in which TypeBox is aligning it's checks to.

Submitting for review Cheers! S

sinclairzx81 commented 1 year ago

@moltar @hoeck Hi guys,

Hey, just wondering if there's a better way to get process isolation for validators that support various modes of operation. I've included AOT, JIT and Dynamic modes for the TB benchmarks, but currently the only way I've been able to ensure process isolation is to split the modes across 3 modules (and also had to add hyphens to the case names to get the preflight tests to pass)

Was thinking about adding additional benchmarks for Ajv (which also supports these modes), but would be good to have a convention in place first. Partially relates to https://github.com/moltar/typescript-runtime-type-benchmarks/issues/1126. Wondering if running each benchmark case isolated might be a good idea after all.

Open to thoughts! :)

moltar commented 1 year ago

better way to get process isolation for validators

I have some ideas, I will share soon in another issue. Overall, I think there needs to be a lot of modernization done.

I want to isolate each package entirely, and each test entirely.