Typical: TypeScript with type safety at runtime
typical.elliots.dev3 pointsby elliotshep0 comments
@sinclair/typebox-(ahead-of-time) - 176 M/ops/s
ts-runtime-checks - 176 M/ops/s
ts-auto-guard - 175 M/ops/s
typia - 173 M/ops/s
spectypes - 166 M/ops/s
typical - 150 M/ops/s
zod - 1.8 M/ops/s
yup - 0.2 M/ops/s
Top 5 and typical all generate pretty much the same code (a bunch of typeof checks). The only difference with typical is that it that the error throwing involves some string concatenation the others don't (typical logs the bad value, and can be used multiple places so passes in the property name). Two men were walking along a road talking of this and that. "What do you think," says one. "Which is more fun, defecating or having sex?"
The guy says, "Let's ask that prostitute, she's done one as often as the other."