-
Notifications
You must be signed in to change notification settings - Fork 52
Benchmarks
Last updated: July 8, 2018
For the latest benchmarks, choose a build in Circle CI and view the results of the yarn run bench
task.
bcoin x 634,273 ops/sec ±2.92% (84 runs sampled)
bitcoin-ts x 362,539 ops/sec ±1.43% (82 runs sampled)
hash.js x 339,214 ops/sec ±2.25% (85 runs sampled)
Node.js native x 213,250 ops/sec ±4.74% (76 runs sampled)
Fastest is bcoin
✔ ripemd160.bench › bench: ripemd160: hash a 32-byte input (23.9s)
bcoin x 505,176 ops/sec ±4.37% (82 runs sampled)
bitcoin-ts x 380,631 ops/sec ±1.32% (88 runs sampled)
hash.js x 188,728 ops/sec ±0.63% (90 runs sampled)
Node.js native x 178,646 ops/sec ±6.20% (75 runs sampled)
Fastest is bcoin
✔ ripemd160.bench › bench: ripemd160: hash a 100-byte input (23.7s)
bcoin x 165,569 ops/sec ±1.43% (83 runs sampled)
bitcoin-ts x 165,386 ops/sec ±2.03% (89 runs sampled)
Node.js native x 109,095 ops/sec ±3.01% (88 runs sampled)
hash.js x 28,269 ops/sec ±1.41% (85 runs sampled)
Fastest is bcoin
✔ ripemd160.bench › bench: ripemd160: hash a 1000-byte input (23.8s)
bitcoin-ts x 26,127 ops/sec ±0.63% (93 runs sampled)
bcoin x 21,750 ops/sec ±0.15% (91 runs sampled)
Node.js native x 19,845 ops/sec ±1.04% (88 runs sampled)
hash.js x 3,182 ops/sec ±0.17% (91 runs sampled)
Fastest is bitcoin-ts
✔ ripemd160.bench › bench: ripemd160: hash a 10000-byte input (23.8s)
bitcoin-ts x 8.07 ops/sec ±5.80% (25 runs sampled)
Node.js native x 7.03 ops/sec ±0.37% (22 runs sampled)
hash.js x 0.49 ops/sec ±1.68% (6 runs sampled)
Fastest is bitcoin-ts
✔ ripemd160.bench › bench: ripemd160: incrementally hash a 32MB input in 1MB chunks (40.9s)
bcoin x 602,524 ops/sec ±2.40% (82 runs sampled)
bitcoin-ts x 191,309 ops/sec ±0.96% (84 runs sampled)
Node.js native x 199,503 ops/sec ±5.70% (77 runs sampled)
hash.js x 105,028 ops/sec ±1.22% (88 runs sampled)
Fastest is bcoin
✔ sha512.bench › bench: sha512: hash a 32-byte input (24s)
bcoin x 576,910 ops/sec ±2.49% (81 runs sampled)
bitcoin-ts x 193,699 ops/sec ±1.26% (91 runs sampled)
Node.js native x 170,210 ops/sec ±6.30% (68 runs sampled)
hash.js x 96,953 ops/sec ±2.05% (85 runs sampled)
Fastest is bcoin
✔ sha512.bench › bench: sha512: hash a 100-byte input (23.9s)
bcoin x 254,093 ops/sec ±2.71% (81 runs sampled)
Node.js native x 127,006 ops/sec ±5.76% (76 runs sampled)
bitcoin-ts x 58,134 ops/sec ±3.78% (79 runs sampled)
hash.js x 9,684 ops/sec ±2.46% (82 runs sampled)
Fastest is bcoin
✔ sha512.bench › bench: sha512: hash a 1000-byte input (24.1s)
bcoin x 36,051 ops/sec ±2.52% (79 runs sampled)
Node.js native x 30,470 ops/sec ±3.04% (80 runs sampled)
bitcoin-ts x 8,532 ops/sec ±2.96% (84 runs sampled)
hash.js x 854 ops/sec ±1.17% (88 runs sampled)
Fastest is bcoin
✔ sha512.bench › bench: sha512: hash a 10000-byte input (23.8s)
Node.js native x 13.35 ops/sec ±0.21% (37 runs sampled)
bitcoin-ts x 2.90 ops/sec ±5.94% (12 runs sampled)
hash.js x 0.20 ops/sec ±6.33% (5 runs sampled)
Fastest is Node.js native
✔ sha512.bench › bench: sha512: incrementally hash a 32MB input in 1MB chunks (1m 9.5s)
bcoin x 610,908 ops/sec ±2.14% (83 runs sampled)
hash.js x 357,434 ops/sec ±0.69% (88 runs sampled)
Node.js native x 233,123 ops/sec ±4.63% (82 runs sampled)
bitcoin-ts x 222,169 ops/sec ±1.22% (88 runs sampled)
Fastest is bcoin
✔ sha256.bench › bench: sha256: hash a 32-byte input (24.1s)
bcoin x 530,731 ops/sec ±2.02% (83 runs sampled)
Node.js native x 209,839 ops/sec ±4.35% (82 runs sampled)
hash.js x 196,624 ops/sec ±0.77% (90 runs sampled)
bitcoin-ts x 171,332 ops/sec ±1.65% (91 runs sampled)
Fastest is bcoin
✔ sha256.bench › bench: sha256: hash a 100-byte input (23.9s)
bcoin x 204,156 ops/sec ±1.51% (90 runs sampled)
Node.js native x 129,326 ops/sec ±3.99% (82 runs sampled)
bitcoin-ts x 44,890 ops/sec ±0.92% (93 runs sampled)
hash.js x 32,262 ops/sec ±0.26% (89 runs sampled)
Fastest is bcoin
✔ sha256.bench › bench: sha256: hash a 1000-byte input (23.8s)
bcoin x 28,774 ops/sec ±0.31% (89 runs sampled)
Node.js native x 26,091 ops/sec ±1.96% (90 runs sampled)
bitcoin-ts x 5,370 ops/sec ±0.35% (94 runs sampled)
hash.js x 3,523 ops/sec ±0.11% (90 runs sampled)
Fastest is bcoin
✔ sha256.bench › bench: sha256: hash a 10000-byte input (23.8s)
Node.js native x 9.43 ops/sec ±0.13% (27 runs sampled)
bitcoin-ts x 1.69 ops/sec ±1.38% (9 runs sampled)
hash.js x 0.52 ops/sec ±2.52% (6 runs sampled)
Fastest is Node.js native
✔ sha256.bench › bench: sha256: incrementally hash a 32MB input in 1MB chunks (44.6s)
bcoin x 543,124 ops/sec ±2.36% (79 runs sampled)
hash.js x 402,595 ops/sec ±1.17% (89 runs sampled)
bitcoin-ts x 276,085 ops/sec ±1.56% (82 runs sampled)
Node.js native x 207,387 ops/sec ±4.82% (80 runs sampled)
Fastest is bcoin
✔ sha1.bench › bench: sha1: hash a 32-byte input (23.9s)
bcoin x 537,052 ops/sec ±1.75% (84 runs sampled)
bitcoin-ts x 206,625 ops/sec ±2.63% (81 runs sampled)
Node.js native x 202,266 ops/sec ±5.02% (81 runs sampled)
hash.js x 178,778 ops/sec ±1.53% (84 runs sampled)
Fastest is bcoin
✔ sha1.bench › bench: sha1: hash a 100-byte input (23.8s)
bcoin x 298,921 ops/sec ±1.40% (87 runs sampled)
Node.js native x 157,147 ops/sec ±3.91% (82 runs sampled)
bitcoin-ts x 62,699 ops/sec ±0.70% (93 runs sampled)
hash.js x 22,395 ops/sec ±0.31% (90 runs sampled)
Fastest is bcoin
✔ sha1.bench › bench: sha1: hash a 1000-byte input (23.8s)
bcoin x 59,041 ops/sec ±0.42% (91 runs sampled)
Node.js native x 50,003 ops/sec ±2.35% (90 runs sampled)
bitcoin-ts x 7,497 ops/sec ±0.58% (93 runs sampled)
hash.js x 2,092 ops/sec ±0.94% (89 runs sampled)
Fastest is bcoin
✔ sha1.bench › bench: sha1: hash a 10000-byte input (23.8s)
Node.js native x 19.90 ops/sec ±1.72% (36 runs sampled)
bitcoin-ts x 2.41 ops/sec ±0.33% (10 runs sampled)
hash.js x 0.39 ops/sec ±3.07% (5 runs sampled)
Fastest is Node.js native
✔ sha1.bench › bench: sha1: incrementally hash a 32MB input in 1MB chunks (44.3s)
secp256k1-node x 9,825 ops/sec ±2.25% (81 runs sampled)
bitcoin-ts x 3,201 ops/sec ±2.84% (83 runs sampled)
elliptic x 377 ops/sec ±4.05% (80 runs sampled)
Fastest is secp256k1-node
✔ secp256k1.bench › bench: secp256k1: verify signature Low-S, uncompressed pubkey (18.1s)
secp256k1-node x 8,726 ops/sec ±3.26% (74 runs sampled)
bitcoin-ts x 3,197 ops/sec ±1.71% (87 runs sampled)
elliptic x 346 ops/sec ±3.14% (79 runs sampled)
Fastest is secp256k1-node
✔ secp256k1.bench › bench: secp256k1: verify signature Low-S, compressed pubkey (17.4s)
secp256k1-node x 21,047 ops/sec ±4.21% (74 runs sampled)
bitcoin-ts x 9,272 ops/sec ±1.98% (80 runs sampled)
elliptic x 1,030 ops/sec ±2.67% (83 runs sampled)
Fastest is secp256k1-node
✔ secp256k1.bench › bench: secp256k1: derive compressed pubkey (17.7s)
secp256k1-node x 13,559 ops/sec ±1.93% (86 runs sampled)
bitcoin-ts x 4,052 ops/sec ±2.86% (78 runs sampled)
elliptic x 815 ops/sec ±2.66% (80 runs sampled)
Fastest is secp256k1-node
✔ secp256k1.bench › bench: secp256k1: create DER Low-S signature (17.7s)
bcoin x 630,996 ops/sec ±1.40% (84 runs sampled)
bitcoin-ts x 333,193 ops/sec ±0.89% (78 runs sampled)
hash.js x 327,401 ops/sec ±0.61% (89 runs sampled)
Node.js native x 256,773 ops/sec ±4.33% (77 runs sampled)
Fastest is bcoin
✔ ripemd160.bench › bench: ripemd160: hash a 32-byte input (24.1s)
bcoin x 501,291 ops/sec ±1.78% (83 runs sampled)
bitcoin-ts x 299,804 ops/sec ±0.40% (91 runs sampled)
Node.js native x 216,912 ops/sec ±4.29% (78 runs sampled)
hash.js x 174,914 ops/sec ±1.11% (87 runs sampled)
Fastest is bcoin
✔ ripemd160.bench › bench: ripemd160: hash a 100-byte input (24s)
bcoin x 168,878 ops/sec ±0.99% (84 runs sampled)
bitcoin-ts x 143,981 ops/sec ±2.27% (89 runs sampled)
Node.js native x 122,710 ops/sec ±2.85% (86 runs sampled)
hash.js x 26,530 ops/sec ±1.76% (89 runs sampled)
Fastest is bcoin
✔ ripemd160.bench › bench: ripemd160: hash a 1000-byte input (23.7s)
bitcoin-ts x 24,678 ops/sec ±0.52% (92 runs sampled)
bcoin x 22,214 ops/sec ±0.08% (90 runs sampled)
Node.js native x 20,907 ops/sec ±0.67% (87 runs sampled)
hash.js x 2,960 ops/sec ±1.16% (90 runs sampled)
Fastest is bitcoin-ts
✔ ripemd160.bench › bench: ripemd160: hash a 10000-byte input (23.6s)
bitcoin-ts x 8.32 ops/sec ±0.08% (25 runs sampled)
Node.js native x 7.22 ops/sec ±0.10% (22 runs sampled)
hash.js x 0.54 ops/sec ±0.45% (6 runs sampled)
Fastest is bitcoin-ts
✔ ripemd160.bench › bench: ripemd160: incrementally hash a 32MB input in 1MB chunks (38.3s)
bcoin x 573,581 ops/sec ±1.62% (84 runs sampled)
Node.js native x 245,534 ops/sec ±5.22% (78 runs sampled)
bitcoin-ts x 180,211 ops/sec ±1.42% (79 runs sampled)
hash.js x 94,774 ops/sec ±1.53% (86 runs sampled)
Fastest is bcoin
✔ sha512.bench › bench: sha512: hash a 32-byte input (24s)
bcoin x 565,217 ops/sec ±3.07% (80 runs sampled)
Node.js native x 238,296 ops/sec ±5.57% (78 runs sampled)
bitcoin-ts x 179,849 ops/sec ±1.91% (88 runs sampled)
hash.js x 91,704 ops/sec ±2.10% (86 runs sampled)
Fastest is bcoin
✔ sha512.bench › bench: sha512: hash a 100-byte input (24.1s)
bcoin x 257,318 ops/sec ±1.57% (83 runs sampled)
Node.js native x 156,127 ops/sec ±3.70% (84 runs sampled)
bitcoin-ts x 69,359 ops/sec ±2.04% (83 runs sampled)
hash.js x 9,607 ops/sec ±1.30% (89 runs sampled)
Fastest is bcoin
✔ sha512.bench › bench: sha512: hash a 1000-byte input (24s)
bcoin x 39,311 ops/sec ±0.71% (88 runs sampled)
Node.js native x 34,224 ops/sec ±2.89% (87 runs sampled)
bitcoin-ts x 9,795 ops/sec ±0.60% (90 runs sampled)
hash.js x 790 ops/sec ±1.72% (85 runs sampled)
Fastest is bcoin
✔ sha512.bench › bench: sha512: hash a 10000-byte input (23.8s)
Node.js native x 13.30 ops/sec ±0.35% (37 runs sampled)
bitcoin-ts x 3.20 ops/sec ±0.89% (12 runs sampled)
hash.js x 0.20 ops/sec ±0.74% (5 runs sampled)
Fastest is Node.js native
✔ sha512.bench › bench: sha512: incrementally hash a 32MB input in 1MB chunks (1m 8.7s)
bcoin x 695,379 ops/sec ±1.50% (84 runs sampled)
hash.js x 343,760 ops/sec ±0.52% (86 runs sampled)
Node.js native x 273,217 ops/sec ±4.59% (79 runs sampled)
bitcoin-ts x 185,888 ops/sec ±0.76% (80 runs sampled)
Fastest is bcoin
✔ sha256.bench › bench: sha256: hash a 32-byte input (24.2s)
bcoin x 579,329 ops/sec ±1.63% (84 runs sampled)
Node.js native x 245,071 ops/sec ±4.74% (80 runs sampled)
hash.js x 188,764 ops/sec ±0.79% (89 runs sampled)
bitcoin-ts x 137,623 ops/sec ±2.05% (84 runs sampled)
Fastest is bcoin
✔ sha256.bench › bench: sha256: hash a 100-byte input (23.9s)
bcoin x 214,160 ops/sec ±1.45% (89 runs sampled)
Node.js native x 137,512 ops/sec ±4.10% (78 runs sampled)
bitcoin-ts x 38,761 ops/sec ±0.92% (89 runs sampled)
hash.js x 30,590 ops/sec ±0.52% (92 runs sampled)
Fastest is bcoin
✔ sha256.bench › bench: sha256: hash a 1000-byte input (24s)
bcoin x 28,489 ops/sec ±1.08% (85 runs sampled)
Node.js native x 26,207 ops/sec ±1.94% (84 runs sampled)
bitcoin-ts x 4,469 ops/sec ±3.25% (87 runs sampled)
hash.js x 3,340 ops/sec ±1.48% (88 runs sampled)
Fastest is bcoin
✔ sha256.bench › bench: sha256: hash a 10000-byte input (23.8s)
Node.js native x 9.32 ops/sec ±0.87% (27 runs sampled)
bitcoin-ts x 1.47 ops/sec ±1.42% (8 runs sampled)
hash.js x 0.52 ops/sec ±3.40% (6 runs sampled)
Fastest is Node.js native
✔ sha256.bench › bench: sha256: incrementally hash a 32MB input in 1MB chunks (45.4s)
bcoin x 774,075 ops/sec ±1.66% (83 runs sampled)
hash.js x 345,073 ops/sec ±2.88% (85 runs sampled)
Node.js native x 274,569 ops/sec ±5.22% (73 runs sampled)
bitcoin-ts x 233,820 ops/sec ±0.80% (83 runs sampled)
Fastest is bcoin
✔ sha1.bench › bench: sha1: hash a 32-byte input (24.2s)
bcoin x 699,023 ops/sec ±2.72% (79 runs sampled)
Node.js native x 272,334 ops/sec ±5.44% (76 runs sampled)
hash.js x 197,226 ops/sec ±1.88% (87 runs sampled)
bitcoin-ts x 182,126 ops/sec ±1.85% (87 runs sampled)
Fastest is bcoin
✔ sha1.bench › bench: sha1: hash a 100-byte input (24.2s)
bcoin x 313,865 ops/sec ±3.51% (78 runs sampled)
Node.js native x 206,325 ops/sec ±3.64% (83 runs sampled)
bitcoin-ts x 52,754 ops/sec ±1.78% (91 runs sampled)
hash.js x 34,732 ops/sec ±0.28% (92 runs sampled)
Fastest is bcoin
✔ sha1.bench › bench: sha1: hash a 1000-byte input (24.2s)
bcoin x 61,627 ops/sec ±0.50% (88 runs sampled)
Node.js native x 54,380 ops/sec ±1.03% (88 runs sampled)
bitcoin-ts x 6,341 ops/sec ±2.42% (87 runs sampled)
hash.js x 3,891 ops/sec ±1.04% (89 runs sampled)
Fastest is bcoin
✔ sha1.bench › bench: sha1: hash a 10000-byte input (23.8s)
Node.js native x 20.44 ops/sec ±1.83% (37 runs sampled)
bitcoin-ts x 2.06 ops/sec ±1.57% (10 runs sampled)
hash.js x 0.58 ops/sec ±3.74% (6 runs sampled)
Fastest is Node.js native
✔ sha1.bench › bench: sha1: incrementally hash a 32MB input in 1MB chunks (40.8s)
secp256k1-node x 9,700 ops/sec ±2.89% (83 runs sampled)
bitcoin-ts x 2,587 ops/sec ±2.86% (70 runs sampled)
elliptic x 317 ops/sec ±3.96% (76 runs sampled)
Fastest is secp256k1-node
✔ secp256k1.bench › bench: secp256k1: verify signature Low-S, uncompressed pubkey (18.1s)
secp256k1-node x 8,780 ops/sec ±2.90% (80 runs sampled)
bitcoin-ts x 3,125 ops/sec ±2.05% (86 runs sampled)
elliptic x 334 ops/sec ±2.76% (80 runs sampled)
Fastest is secp256k1-node
✔ secp256k1.bench › bench: secp256k1: verify signature Low-S, compressed pubkey (17.9s)
secp256k1-node x 24,968 ops/sec ±1.65% (87 runs sampled)
bitcoin-ts x 7,225 ops/sec ±4.42% (73 runs sampled)
elliptic x 1,103 ops/sec ±4.18% (87 runs sampled)
Fastest is secp256k1-node
✔ secp256k1.bench › bench: secp256k1: derive compressed pubkey (18.2s)
secp256k1-node x 13,641 ops/sec ±2.49% (85 runs sampled)
bitcoin-ts x 4,204 ops/sec ±1.56% (83 runs sampled)
elliptic x 827 ops/sec ±1.08% (86 runs sampled)
Fastest is secp256k1-node
✔ secp256k1.bench › bench: secp256k1: create DER Low-S signature (17.9s)