typescript-runtime-type-benchmarks icon indicating copy to clipboard operation
typescript-runtime-type-benchmarks copied to clipboard

ahead-of-time clarification

Open MentalGear opened this issue 1 year ago • 3 comments

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 avatar Feb 20 '24 11:02 MentalGear

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.

MentalGear avatar Feb 20 '24 12:02 MentalGear

@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

moltar avatar Feb 20 '24 12:02 moltar

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.

MentalGear avatar Feb 20 '24 12:02 MentalGear