eskimojo

eskimojo

@eskimojo.bsky.social

Redux Toolkit co-maintainer, and developer of https://schemabenchmarks.dev/. pfp and banner by @popurri_arts he/him

47 followers19 following21 posts

eskimojo reposted

eskimojo reposted

Incredibly hyped to announce Schema Benchmarks, a project I've been steadily working on in collaboration with @fabianhiller.com! It aims to provide a central and transparent resource for many of the metrics that matter for schemas, including bundle size and runtime performance ๐Ÿ˜„

View full thread

Our current results, starting with bundle size (compiled with @rolldown.rs): Typia and Valibot lead here, with very similar results (~1.9KB minified + gzipped). Zod brings up the rear, maybe due to its extensive language support. Its mini variant however is far smaller, at 5KB.

an update to this: i noticed a discrepancy between our zod benchmark and zod's docs, namely that we were using a default import and the docs show a namespace import. updating our benchmark to match the docs brought zod down to a much more reasonable 16KB.

Incredibly hyped to announce Schema Benchmarks, a project I've been steadily working on in collaboration with @fabianhiller.com! It aims to provide a central and transparent resource for many of the metrics that matter for schemas, including bundle size and runtime performance ๐Ÿ˜„

View full thread

Now for parsing; where the schema returns a new value. We mark try/catch tests with *, and "abort early" tests with โ€ . Libraries that can abort early (Valibot, Effect, joi) have an advantage with invalid data, and Typebox clocks in slowest, constrasting its validation results.

quick update re: Typebox - it had been slowed down by a feature in v1 that attempts to coerce an invalid value into a valid one. v1.1 now makes that feature opt-in. here's an updated set of results, with a vast improvement in typebox's performance:

Incredibly hyped to announce Schema Benchmarks, a project I've been steadily working on in collaboration with @fabianhiller.com! It aims to provide a central and transparent resource for many of the metrics that matter for schemas, including bundle size and runtime performance ๐Ÿ˜„

eskimojo reposted

Proud to have teamed up with @eskimojo.bsky.social on Schema Benchmarks! ๐Ÿ™Œ Valibot and Typia neck-and-neck on bundle size (~1.9KB gzipped)โ€”the fight for the smallest bundles is heating up! ๐Ÿ”ฅ Transparent metrics like these help us all improveโ€”dive in and let us know what you think!

eskimojo@eskimojo.bsky.social

Incredibly hyped to announce Schema Benchmarks, a project I've been steadily working on in collaboration with @fabianhiller.com! It aims to provide a central and transparent resource for many of the metrics that matter for schemas, including bundle size and runtime performance ๐Ÿ˜„

Incredibly hyped to announce Schema Benchmarks, a project I've been steadily working on in collaboration with @fabianhiller.com! It aims to provide a central and transparent resource for many of the metrics that matter for schemas, including bundle size and runtime performance ๐Ÿ˜„

View full thread

Now for parsing; where the schema returns a new value. We mark try/catch tests with *, and "abort early" tests with โ€ . Libraries that can abort early (Valibot, Effect, joi) have an advantage with invalid data, and Typebox clocks in slowest, constrasting its validation results.

Incredibly hyped to announce Schema Benchmarks, a project I've been steadily working on in collaboration with @fabianhiller.com! It aims to provide a central and transparent resource for many of the metrics that matter for schemas, including bundle size and runtime performance ๐Ÿ˜„

View full thread

With regards to initialisation time: Some libraries are very quick here (Typia, VineJS, Rod). Most libraries achieve a fairly speedy initialisation time, with the exception of Ajv - currently measuring in at over 4ms ๐Ÿ˜…

Validation time! That's simply checking whether a value matches a schema, and only returning a boolean. We check against both valid and invalid data (these results are for invalid data): Typia, Typebox and Ajv are all blazing fast at this. Yup is far slower, with joi following.

Incredibly hyped to announce Schema Benchmarks, a project I've been steadily working on in collaboration with @fabianhiller.com! It aims to provide a central and transparent resource for many of the metrics that matter for schemas, including bundle size and runtime performance ๐Ÿ˜„

eskimojo reposted

Should we drop a dedicated open-source project comparing ALL major schema libs? ๐Ÿค” We could test: โฑ๏ธ Initialization speed โœ… Validation speed โšก Parsing speed ๐Ÿ“ฆ Download time (bundle size) If this gets tractionโ€ฆ we launch it ๐Ÿš€๐Ÿ“Š

Fabian Hiller@fabianhiller.com

Just updated the @valibot.dev comparison guide to also including the new Zod Mini. Bundle sizes for a typical login schema: ๐Ÿค– Valibot: 1.37 kB ๐Ÿ’Ž Zod: 17.7 kB ๐Ÿ’Ž Zod Mini: 6.88 kB

eskimojo reposted

Redux toolkit has pretty much nailed all the pain points Iโ€™ve previously had with redux, which I still use a ton and love, but wasnโ€™t able to upgrade to rtk yet. Started redoing a very old app with it and it has so much clarity and way less boilerplate. Thank you @acemarke.dev, @phry.dev and all...

You are up to date.