vitest bench , Apple Silicon, seeded PRNG. Array sizes: 100, 1K, 10K, 100K.
Node.js Bun Deno
pipe (data, A . filter ( x => x > threshold), A . map ( x => x * 2 ), A . take ( 10 ))
All three operations fuse into a single loop. take(10) halts after 10 results. The loop never visits the rest of the array.
9x filter→map→take(10) on 100K elements
10x filter→map→take(10) on 100K elements
6x filter→map→take(10) on 100K elements
stopcock holds ~4M ops/s from n=100 to n=100K (the flat line). Every other library degrades linearly because they make three separate passes and allocate intermediate arrays. At 100K elements, native JS does 703 ops/s. Fusion does 4.2M.
pipe (data, A . filter ( x => x > 0 ), A . map ( x => x * 2 ), A . sortBy (( a , b ) => a - b), A . take ( 5 ))
sort can’t fuse because it needs the full array. filter → map fuses into one loop, materializes the result, then sort runs, then take slices.
Library ops/sec vs fastest stopcock 25,473 fastest ts-belt 6,997 -72.53% rambda 1,327 -94.79% ramda 1,133 -95.55% remeda 898 -96.48% lodash 856 -96.64%
Library ops/sec vs fastest stopcock 20,008 fastest ts-belt 4,413 -77.94% ramda 1,123 -94.39% rambda 918 -95.41% remeda 754 -96.23% lodash 747 -96.27%
Library ops/sec vs fastest stopcock 25,230 fastest ts-belt 4,254 -83.14% rambda 1,170 -95.36% ramda 1,049 -95.84% remeda 851 -96.63% lodash 692 -97.26%
The advantage shrinks because sort dominates the runtime. But partial fusion still helps. The fused filter → map segment avoids an intermediate array and runs in one pass before handing off to sort.
Outside of fused chains, stopcock still competes on raw single-op speed.
Library ops/sec vs fastest stopcock 11,338 fastest lodash 7,329 -35.36% ramda 5,809 -48.77% rambda 4,671 -58.81% remeda 3,585 -68.38%
Library ops/sec vs fastest stopcock 9,564 fastest lodash 7,178 -24.95% ramda 6,257 -34.57% rambda 4,544 -52.49% remeda 3,293 -65.57%
Library ops/sec vs fastest stopcock 19,506 fastest lodash 10,672 -45.29% ramda 9,718 -50.18% rambda 5,656 -71.00% remeda 4,058 -79.20%
Library ops/sec vs fastest ramda 136,275 fastest lodash 125,755 -7.72% stopcock 121,142 -11.10% ts-belt 78,002 -42.76% rambda 23,465 -82.78% remeda 10,712 -92.14%
Library ops/sec vs fastest stopcock 140,703 fastest ts-belt 134,955 -4.09% lodash 123,283 -12.38% ramda 107,382 -23.68% rambda 26,625 -81.08% remeda 12,770 -90.92%
Library ops/sec vs fastest stopcock 143,456 fastest ts-belt 138,512 -3.45% ramda 134,230 -6.43% lodash 126,404 -11.89% rambda 35,878 -74.99% remeda 15,813 -88.98%
Library ops/sec vs fastest rambda 23,368,510 fastest ramda 22,928,818 -1.88% ts-belt 18,327,332 -21.57% stopcock 17,470,998 -25.24% remeda 8,189,931 -64.95% lodash 6,680,339 -71.41%
Library ops/sec vs fastest rambda 21,737,382 fastest ramda 19,134,726 -11.97% ts-belt 17,349,326 -20.19% stopcock 15,755,309 -27.52% remeda 7,441,233 -65.77% lodash 4,928,192 -77.33%
Library ops/sec vs fastest rambda 20,421,200 fastest ts-belt 19,187,677 -6.04% ramda 18,660,651 -8.62% stopcock 15,889,463 -22.19% remeda 9,417,807 -53.88% lodash 6,232,118 -69.48%
Library ops/sec vs fastest rambda 264,433 fastest stopcock 258,052 -2.41% ramda 251,172 -5.01% ts-belt 220,286 -16.70% lodash 165,848 -37.28%
Library ops/sec vs fastest stopcock 276,896 fastest ramda 265,565 -4.09% rambda 256,998 -7.19% ts-belt 211,955 -23.45% lodash 189,618 -31.52%
Library ops/sec vs fastest stopcock 267,794 fastest ts-belt 267,405 -0.15% rambda 257,943 -3.68% ramda 252,340 -5.77% lodash 203,066 -24.17%
Library ops/sec vs fastest stopcock 14,465,125 fastest ts-belt 14,062,698 -2.78% ramda 13,936,418 -3.66% remeda 11,799,806 -18.43% rambda 8,585,373 -40.65% lodash 6,091,707 -57.89%
Library ops/sec vs fastest ts-belt 15,296,568 fastest ramda 14,578,597 -4.69% stopcock 13,752,740 -10.09% remeda 11,806,983 -22.81% rambda 9,070,263 -40.70% lodash 5,639,633 -63.13%
Library ops/sec vs fastest ts-belt 17,199,571 fastest stopcock 15,889,500 -7.62% ramda 15,516,395 -9.79% remeda 15,067,655 -12.40% rambda 9,855,120 -42.70% lodash 6,411,402 -62.72%
Library ops/sec vs fastest ramda 188,535 fastest rambda 174,185 -7.61% stopcock 167,662 -11.07% remeda 158,337 -16.02% ts-belt 66,647 -64.65% lodash 37,362 -80.18%
Library ops/sec vs fastest remeda 149,684 fastest rambda 144,652 -3.36% ramda 136,643 -8.71% stopcock 136,307 -8.94% ts-belt 56,910 -61.98% lodash 35,480 -76.30%
Library ops/sec vs fastest remeda 723,728 fastest ramda 693,289 -4.21% rambda 635,148 -12.24% stopcock 552,432 -23.67% ts-belt 95,497 -86.80% lodash 69,725 -90.37%
Library ops/sec vs fastest stopcock 5,195 fastest lodash 4,741 -8.74% ramda 3,346 -35.60% rambda 2,003 -61.45% remeda 1,945 -62.57% ts-belt 43 -99.17%
Library ops/sec vs fastest stopcock 5,490 fastest lodash 3,778 -31.19% ramda 2,669 -51.38% rambda 2,122 -61.35% remeda 1,619 -70.50% ts-belt 33 -99.40%
Library ops/sec vs fastest stopcock 5,121 fastest lodash 4,618 -9.83% ramda 3,733 -27.11% remeda 2,244 -56.19% rambda 2,077 -59.44% ts-belt 126 -97.55%
ts-belt falls over at n=10K. O(n²) implementation.
Library ops/sec vs fastest ramda 1,050 fastest remeda 951 -9.37% stopcock 937 -10.71% lodash 248 -76.33% rambda 175 -83.35% ts-belt 28 -97.38%
Library ops/sec vs fastest stopcock 1,673 fastest ramda 1,092 -34.70% remeda 711 -57.48% rambda 175 -89.56% lodash 173 -89.63% ts-belt 27 -98.40%
Library ops/sec vs fastest stopcock 1,546 fastest remeda 1,323 -14.45% ramda 1,224 -20.82% lodash 367 -76.25% rambda 134 -91.34% ts-belt 51 -96.73%
Library ops/sec vs fastest ramda 1,319 fastest stopcock 786 -40.42% remeda 718 -45.54% lodash 269 -79.61% rambda 79 -93.98% ts-belt 1 -99.89%
Library ops/sec vs fastest ramda 1,475 fastest stopcock 1,098 -25.57% remeda 624 -57.69% lodash 329 -77.71% rambda 83 -94.38% ts-belt 2 -99.89%
Library ops/sec vs fastest stopcock 1,837 fastest ramda 1,506 -18.02% remeda 1,371 -25.41% lodash 446 -75.75% rambda 70 -96.19% ts-belt 2 -99.91%
Library ops/sec vs fastest stopcock 2,131 fastest ts-belt 1,889 -11.33% rambda 547 -74.32% ramda 539 -74.72% remeda 530 -75.13% lodash 372 -82.52%
Library ops/sec vs fastest ts-belt 1,904 fastest stopcock 1,600 -16.01% ramda 527 -72.35% remeda 491 -74.24% rambda 444 -76.69% lodash 323 -83.06%
Library ops/sec vs fastest ts-belt 1,555 fastest stopcock 1,463 -5.93% rambda 550 -64.63% remeda 508 -67.36% ramda 488 -68.62% lodash 301 -80.65%
Library ops/sec vs fastest stopcock 8,491 fastest remeda 8,104 -4.56% lodash 5,192 -38.86% ts-belt 5,144 -39.42% rambda 5,088 -40.09% ramda 2,546 -70.02%
Library ops/sec vs fastest stopcock 7,203 fastest remeda 6,900 -4.21% lodash 4,951 -31.27% ts-belt 4,863 -32.49% rambda 4,730 -34.34% ramda 3,017 -58.12%
Library ops/sec vs fastest stopcock 8,107 fastest remeda 7,165 -11.62% rambda 6,265 -22.72% lodash 4,830 -40.41% ts-belt 4,227 -47.86% ramda 2,921 -63.97%
Library ops/sec vs fastest ts-belt 31,905 fastest stopcock 30,125 -5.58% rambda 16,406 -48.58% lodash 16,248 -49.07% remeda 6,665 -79.11% ramda 3,887 -87.82%
Library ops/sec vs fastest ts-belt 23,372 fastest stopcock 19,474 -16.68% lodash 13,969 -40.23% rambda 12,498 -46.52% remeda 4,922 -78.94% ramda 2,989 -87.21%
Library ops/sec vs fastest ts-belt 43,129 fastest stopcock 39,206 -9.10% rambda 25,159 -41.67% lodash 12,096 -71.95% remeda 8,571 -80.13% ramda 3,089 -92.84%
Library ops/sec vs fastest ts-belt 24,174 fastest stopcock 22,952 -5.06% lodash 19,712 -18.46% rambda 15,597 -35.48% ramda 7,757 -67.91% remeda 7,373 -69.50%
Library ops/sec vs fastest ts-belt 23,468 fastest stopcock 22,172 -5.52% lodash 20,373 -13.19% rambda 14,862 -36.67% ramda 7,965 -66.06% remeda 7,322 -68.80%
Library ops/sec vs fastest stopcock 36,757 fastest ts-belt 33,545 -8.74% lodash 26,823 -27.03% remeda 25,679 -30.14% rambda 20,495 -44.24% ramda 8,754 -76.18%
Library ops/sec vs fastest stopcock 47,254 fastest rambda 42,211 -10.67% remeda 41,645 -11.87% ts-belt 41,087 -13.05% ramda 25,297 -46.47% lodash 17,292 -63.41%
Library ops/sec vs fastest remeda 44,514 fastest rambda 43,845 -1.50% stopcock 36,786 -17.36% ts-belt 29,620 -33.46% ramda 18,113 -59.31% lodash 17,018 -61.77%
Library ops/sec vs fastest ts-belt 68,886 fastest remeda 54,325 -21.14% rambda 53,192 -22.78% stopcock 49,456 -28.21% ramda 24,003 -65.16% lodash 22,075 -67.95%
Library ops/sec vs fastest remeda 179,801 fastest lodash 179,722 -0.04% ramda 179,200 -0.33% stopcock 173,097 -3.73% ts-belt 120,793 -32.82%
Library ops/sec vs fastest lodash 173,242 fastest stopcock 171,516 -1.00% remeda 167,698 -3.20% ramda 162,919 -5.96% ts-belt 112,133 -35.27%
Library ops/sec vs fastest lodash 173,339 fastest ramda 167,859 -3.16% remeda 163,364 -5.75% ts-belt 152,551 -11.99% stopcock 140,689 -18.84%
Library ops/sec vs fastest stopcock 128,892 fastest lodash 33,626 -73.91%
Library ops/sec vs fastest stopcock 111,633 fastest lodash 30,660 -72.54%
Library ops/sec vs fastest stopcock 144,147 fastest lodash 44,665 -69.01%
Library ops/sec vs fastest stopcock 139,805 fastest lodash 33,495 -76.04%
Library ops/sec vs fastest stopcock 136,530 fastest lodash 33,920 -75.16%
Library ops/sec vs fastest stopcock 136,640 fastest lodash 42,473 -68.92%
Library ops/sec vs fastest stopcock 8,093 fastest
Library ops/sec vs fastest stopcock 5,849 fastest
Library ops/sec vs fastest stopcock 8,198 fastest
Library ops/sec vs fastest stopcock 653,485 fastest
Library ops/sec vs fastest stopcock 649,009 fastest
Library ops/sec vs fastest stopcock 592,813 fastest