Skip to main content

Zygos Bundle Size

Real numbers. No marketing fluff. Data auto-generated on Feb 20, 2026.

TL;DR​

ComparisonZygosCompetitorSavings
vs Neverthrow774 B1.96 kB2.6x smaller
vs fp-ts
Option
226 B2.91 kB13.2x smaller

Result Pattern (vs Neverthrow)​

Individual module sizes, minified + gzipped. Zygos is the baseline.

ModuleZygosNeverthrow
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%
Data generated on Feb 20, 2026 · Measured with esbuild + gzip

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/core/zygos/result/result";
import { ResultAsync } from "@pithos/core/zygos/result/result-async";

// Your code works unchanged

FP Monads (vs fp-ts)​

ModuleZygosfp-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%
Data generated on Feb 20, 2026 · Measured with esbuild + gzip

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/core/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.

ModuleZygosNeverthrowfp-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/A9.33 kB
+1854%
Full library
All Zygos modules combined
1.18 kB
baseline
2.00 kB
+69%
9.33 kB
+689%
Data generated on Feb 20, 2026 · Measured with esbuild + gzip

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