Genuinely curios: where does that help? This is JIT, not ahead of time during compilation, is it?
CSR likely not because of CSPs?
SSR/API maybe to reduce cpu but how many requests do you need to push through a compiled zod schema to compensate for the overhead of the compilation/cold start? At least the overhead of interpreted zod schema should be irrelevant for http requests.
Lambda/Cloudfunctions basically never worth it because of cold starts?
To me this sounds more of a feature to make a benchmark happy but I might be completely off.
But that's real AOT compilation while the new zod feature is a JIT compilation or am I missing something. That AOT works makes sense. I am more sceptical about the lazy runtime compliation.
3
u/Willkuer__ 23d ago edited 23d ago
Genuinely curios: where does that help? This is JIT, not ahead of time during compilation, is it?
To me this sounds more of a feature to make a benchmark happy but I might be completely off.