moltar / typescript-runtime-type-benchmarks

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

ahead-of-time clarification #1217

Open MentalGear opened 9 months ago

MentalGear commented 9 months ago

first off: Thanks your for this objective and comprehensive benchmark! It's really annoying that every library uses their own benchmarks and not a neutral one like yours.

I was wondering if Typebox "ahead-of-time" designation is the same as using the compiled schema plus imported as a module; does the Just-in-Time version also use the compiled schema?

MentalGear commented 9 months ago

OK, I checked the code and the compiled schema is always used. https://github.com/moltar/typescript-runtime-type-benchmarks/blob/8b73807682ca5d8aa05e2f5b654110e6fce2992f/cases/sinclair-typebox-just-in-time.ts#L2

Still, maybe it could be added that the compiled schema is used just to be clearer.

moltar commented 9 months ago

@MentalGear Thank you for your kind words.

It's really annoying that every library uses their own benchmarks and not a neutral one like yours.

Agreed, that was the intended goal.

However, I think we are still not achieving this nirvana 😁

Please let me know if you have any thoughts on this in #300 and #1126.

I was wondering if Typebox "ahead-of-time" designation is the same as using the compiled schema plus imported as a module; does the Just-in-Time version also use the compiled schema?

The context for this is in #1125

MentalGear commented 9 months ago

However, I think we are still not achieving this nirvana 😁

I guess for that, one would need to collect all lib's benchmarks and have them run against all libs as well. :D

Please let me know if you have any thoughts on this in https://github.com/moltar/typescript-runtime-type-benchmarks/issues/300 and https://github.com/moltar/typescript-runtime-type-benchmarks/issues/1126.

Yes, coherent and clear labels (with an icon hover) would be great. I also assume (dynamic) means a not compiled Schema.