Skip to content

Commit

Permalink
Revamp types
Browse files Browse the repository at this point in the history
  • Loading branch information
bloodyowl committed Mar 11, 2024
1 parent 5ed4bff commit 870345b
Show file tree
Hide file tree
Showing 7 changed files with 524 additions and 706 deletions.
20 changes: 10 additions & 10 deletions benchmark/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,26 @@ Tested on a M1 Pro MacBook Pro.
## Option

```
fp-ts Option none x 134,775,969 ops/sec ±0.70% (99 runs sampled)
fp-ts Option some x 95,087,860 ops/sec ±0.26% (97 runs sampled)
fp-ts Option some chain x 121,914,020 ops/sec ±0.19% (98 runs sampled)
Boxed Option none x 157,293,978 ops/sec ±0.11% (98 runs sampled)
Boxed Option some x 204,144,235 ops/sec ±0.27% (94 runs sampled)
Boxed Option some flatMap x 204,023,130 ops/sec ±0.65% (97 runs sampled)
fp-ts Option none x 130,955,745 ops/sec ±1.11% (98 runs sampled)
fp-ts Option some x 97,400,638 ops/sec ±0.26% (100 runs sampled)
fp-ts Option some chain x 2,776,666 ops/sec ±0.16% (97 runs sampled)
Boxed Option none x 1,030,036,990 ops/sec ±0.13% (100 runs sampled)
Boxed Option some x 461,820,063 ops/sec ±0.20% (101 runs sampled)
Boxed Option some flatMap x 461,736,015 ops/sec ±0.32% (97 runs sampled)
```

## Result

```
fp-ts Result x 114,543,587 ops/sec ±0.15% (99 runs sampled)
Boxed Result x 202,457,204 ops/sec ±0.27% (100 runs sampled)
fp-ts Result x 117,922,535 ops/sec ±0.39% (98 runs sampled)
Boxed Result x 465,661,918 ops/sec ±0.21% (101 runs sampled)
```

## Future

Careful on the interpretation of the following, as Future doesn't use microtasks and calls its listeners synchronously.

```
Future x 36,365,914 ops/sec ±0.81% (92 runs sampled)
Promise x 12,402,743 ops/sec ±0.94% (90 runs sampled)
Future x 38,364,199 ops/sec ±0.68% (92 runs sampled)
Promise x 13,482,385 ops/sec ±0.25% (90 runs sampled)
```
Loading

0 comments on commit 870345b

Please sign in to comment.