Skip to content

Instantly share code, notes, and snippets.

@funny-falcon
Last active December 26, 2016 16:00
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save funny-falcon/956a49e77080d5a6d387dfd90d6d06d2 to your computer and use it in GitHub Desktop.
Save funny-falcon/956a49e77080d5a6d387dfd90d6d06d2 to your computer and use it in GitHub Desktop.
bench trunk vs falcon

Compare new trunk with falcon st_table implementation

Measured:

Environment:

  • Core(TM) i7-4770 CPU @ 3.40GHz
  • Ubuntu 16.04
  • gcc (Ubuntu 5.4.0-6ubuntu1~16.04.2) 5.4.0 20160609

Size

st_sizes

Big Hash

ruby String

big rstr hit

big rstr miss

integer

big int hit

big int miss

null terminated string

big cstr hit

big cstr miss

symbol

big symbol hit

big symbol miss

Many hashes

ruby String

many rstr hit

many rstr miss

integer

many int hit

many int miss

null terminated string

many cstr hit

many cstr miss

symbol

many symbol hit

many symbol miss

Small hashes

ruby String

small rstr hit

small rstr miss

integer

small int hit

small int miss

null terminated string

small cstr hit

small cstr miss

symbol

small symbol hit

small symbol miss

size trunk-new falcon
0 160 128
1 160 128
2 160 128
3 160 128
4 160 128
5 256 216
6 256 216
7 256 216
8 256 288
9 448 288
10 448 288
11 448 400
12 448 400
13 448 400
14 448 400
15 448 544
16 448 544
17 896 544
18 896 544
19 896 544
20 896 544
21 896 792
22 896 792
23 896 792
24 896 792
25 896 792
26 896 792
27 896 792
28 896 792
29 896 792
30 896 1056
31 896 1056
32 896 1056
33 1728 1056
34 1728 1056
35 1728 1056
36 1728 1056
37 1728 1056
38 1728 1056
39 1728 1056
40 1728 1056
41 1728 1552
42 1728 1552
43 1728 1552
44 1728 1552
45 1728 1552
46 1728 1552
47 1728 1552
48 1728 1552
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment