Zygos Bundle Size
Real numbers. No marketing fluff. Data auto-generated on Feb 20, 2026.
TL;DR
| Comparison | Zygos | Competitor | Savings |
|---|---|---|---|
| vs Neverthrow | 774 B | 1.96 kB | 2.6x smaller |
| vs fp-ts Option | 226 B | 2.91 kB | 13.2x smaller |
Result Pattern (vs Neverthrow)
Individual module sizes, minified + gzipped. Zygos is the baseline.
| Module | Zygos | Neverthrow |
|---|---|---|
Result Result monad (ok, err, safeTry) | 732 B baseline | 1.94 kB +171% |
ResultAsync ResultAsync monad (okAsync, errAsync, fromPromise) | 709 B baseline | 1.96 kB +183% |
Result + ResultAsync Result + ResultAsync combined | 774 B baseline | 1.96 kB +159% |
Safe Safe wrapper for try/catch | 712 B baseline | 1.94 kB +179% |
Zygos is 100% API compatible with Neverthrow, making migration seamless:
// Change this:
import { ok, err, Result, ResultAsync } from "neverthrow";
// To this:
import { ok, err, Result } from "pithos/zygos/result/result";
import { ResultAsync } from "pithos/zygos/result/result-async";
// Your code works unchanged
FP Monads (vs fp-ts)
| Module | Zygos | fp-ts |
|---|---|---|
Option Option monad (some, none, map, flatMap, fold) | 226 B baseline | 2.91 kB +1219% |
Either Either monad (left, right, map, flatMap, fold) | 230 B baseline | 3.46 kB +1442% |
Task Task monad (of, map, flatMap) | 116 B baseline | 1.86 kB +1541% |
TaskEither TaskEither monad (left, right, tryCatch, map, flatMap, fold) | 268 B baseline | 5.59 kB +2036% |
Philosophy Difference
While fp-ts relies on pipe and module-level functions, Zygos uses a fluent chainable API that feels more natural in TypeScript:
// fp-ts style
import { pipe } from "fp-ts/function";
import * as E from "fp-ts/Either";
pipe(
E.right(5),
E.map(x => x * 2),
E.fold(
e => `Error: ${e}`,
a => `Result: ${a}`
)
);
// Zygos style
import { ok } from "pithos/zygos/result/result";
ok(5)
.map(x => x * 2)
.match(
a => `Result: ${a}`,
e => `Error: ${e}`
);
Combined Comparison
Full library bundles when importing all modules.
| Module | Zygos | Neverthrow | fp-ts |
|---|---|---|---|
All Result modules All Result modules (Result + ResultAsync + Safe) | 822 B baseline | 2.00 kB +149% | N/A |
All FP monads All FP monads (Option + Either + Task + TaskEither) | 489 B baseline | N/A | 9.33 kB +1854% |
Full library All Zygos modules combined | 1.18 kB baseline | 2.00 kB +69% | 9.33 kB +689% |
Why the Difference?
fp-ts provides a complete functional programming toolkit with Functor, Applicative, Monad abstractions. If you only need Result/Either for error handling, you're shipping unused code.
Neverthrow is focused on the Result pattern but still carries some overhead from its class-based implementation. Importing any function pulls in the full library.
Zygos is designed from the ground up for tree-shaking. Each function is standalone, so you only ship what you use.
Reproduce These Results
Want to verify these results? See how to reproduce our data.
Zero Dependencies
Every kilobyte you add from Pithos is pure Pithos code: there are no transitive dependencies and no hidden packages pulled into your node_modules. You can verify this yourself by inspecting the dependency tree:
# Pithos dependency tree
pithos (varies by import)
└── (nothing else)
This also means zero supply chain risk from third-party packages.
Pithos v1.1.0 / Neverthrow v8.2.0 / fp-ts v2.16.11
Related
- Zygos vs Neverthrow — Full comparison: philosophy, API, migration
- Kanon — Bundle Size — Validation library size comparison
- Arkhe — Bundle Size — Utility function size comparison
- Zygos Module Guide — Full module documentation