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

Honest benchmark callback #1268

Closed DZakh closed 1 month ago

DZakh commented 2 months ago

I noticed that for some libraries, the operation is inlined instead of being called inside the benchmark callback. Since there are many libraries that could be potentially inlined like this eg Zod, but they still used the benchmark callback, I've decided to walk through all the libraries that don't use it and fix them. I think it'll make the benchmark more honest.

moltar commented 2 months ago

Thanks, @DZakh!

hoeck commented 1 month ago

I've read that function call overhead in V8 is basically nonexistent - but a consistent notation in the benchmarks is good to have too :+1: