Skip to content

Instantly share code, notes, and snippets.

@themasch
Last active December 20, 2015 17:19
Show Gist options
  • Save themasch/6167744 to your computer and use it in GitHub Desktop.
Save themasch/6167744 to your computer and use it in GitHub Desktop.
% node_modules/matcha/bin/matcha benchmark/*.js
buffer vs string
30,483 op/s ⨠ buffer
16,052 op/s ⨠ string
decode to buffer
29,790 op/s ⨠ bencode
28,577 op/s ⨠ bencoding
26,095 op/s ⨠ dht_bencode
1,061 op/s ⨠ bncode
21,388 op/s ⨠ dht
decode to utf8
1,032 op/s ⨠ bencode
decode to ascii
17,876 op/s ⨠ bencode
decode to binary
18,287 op/s ⨠ bencode
encode buffer
11,080 op/s ⨠ bencode
5,533 op/s ⨠ bencoding
6,711 op/s ⨠ dht_bencode
5,696 op/s ⨠ bncode
10,837 op/s ⨠ dht
encode utf8
1,243 op/s ⨠ bencode
1,407 op/s ⨠ bencoding
1,524 op/s ⨠ dht_bencode
1,410 op/s ⨠ bncode
1,235 op/s ⨠ dht
encode ascii
8,345 op/s ⨠ bencode
5,739 op/s ⨠ bencoding
6,673 op/s ⨠ dht_bencode
5,535 op/s ⨠ bncode
9,052 op/s ⨠ dht
encode binary
1,276 op/s ⨠ bencode
1,459 op/s ⨠ bencoding
1,565 op/s ⨠ dht_bencode
1,455 op/s ⨠ bncode
1,268 op/s ⨠ dht
Suites: 9
Benches: 30
Elapsed: 42,147.59 ms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment