Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance improvements #4

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SaveTheRbtz
Copy link

@SaveTheRbtz SaveTheRbtz commented Dec 8, 2022

In this PR:

  • Switch to faster hash
name          time/op
Murmur/1-8      2.68ns ± 1%
Murmur/4-8      3.45ns ± 1%
Murmur/8-8      4.70ns ± 0%
Murmur/16-8     6.19ns ± 0%
Murmur/32-8     10.6ns ± 0%
Murmur/50-8     16.3ns ± 2%
Murmur/500-8     202ns ± 0%
XXH3/1-8        2.53ns ± 2%
XXH3/4-8        2.51ns ± 2%
XXH3/8-8        2.45ns ± 1%
XXH3/16-8       2.35ns ± 1%
XXH3/32-8       3.16ns ± 0%
XXH3/50-8       4.87ns ± 5%
XXH3/500-8      38.6ns ± 1%
  • Switch to faster sort
name      old time/op    new time/op    delta
Build        121ms ± 2%     101ms ± 3%  -16.14%  (p=0.000 n=10+10)
Table       36.7ns ± 2%    28.1ns ± 2%  -23.35%  (p=0.000 n=9+9)
TableMap    74.2ns ± 6%    63.9ns ± 3%  -13.95%  (p=0.000 n=10+9)

name      old alloc/op   new alloc/op   delta
Build       32.7MB ± 0%    32.7MB ± 0%   +0.02%  (p=0.000 n=7+9)
Table        0.00B          0.00B          ~     (all equal)
TableMap     0.00B          0.00B          ~     (all equal)

name      old allocs/op  new allocs/op  delta
Build         302k ± 0%      302k ± 0%   +0.07%  (p=0.000 n=10+10)
Table         0.00           0.00          ~     (all equal)
TableMap      0.00           0.00          ~     (all equal)

Ref: #3

In this diff:
* Switch to faster hash

```
name          time/op
Murmur/1-8      2.68ns ± 1%
Murmur/4-8      3.45ns ± 1%
Murmur/8-8      4.70ns ± 0%
Murmur/16-8     6.19ns ± 0%
Murmur/32-8     10.6ns ± 0%
Murmur/50-8     16.3ns ± 2%
Murmur/500-8     202ns ± 0%
XXH3/1-8        2.53ns ± 2%
XXH3/4-8        2.51ns ± 2%
XXH3/8-8        2.45ns ± 1%
XXH3/16-8       2.35ns ± 1%
XXH3/32-8       3.16ns ± 0%
XXH3/50-8       4.87ns ± 5%
XXH3/500-8      38.6ns ± 1%
```

* Switch to faster sort
```
name      old time/op    new time/op    delta
Build        121ms ± 2%     101ms ± 3%  -16.14%  (p=0.000 n=10+10)
Table       36.7ns ± 2%    28.1ns ± 2%  -23.35%  (p=0.000 n=9+9)
TableMap    74.2ns ± 6%    63.9ns ± 3%  -13.95%  (p=0.000 n=10+9)

name      old alloc/op   new alloc/op   delta
Build       32.7MB ± 0%    32.7MB ± 0%   +0.02%  (p=0.000 n=7+9)
Table        0.00B          0.00B          ~     (all equal)
TableMap     0.00B          0.00B          ~     (all equal)

name      old allocs/op  new allocs/op  delta
Build         302k ± 0%      302k ± 0%   +0.07%  (p=0.000 n=10+10)
Table         0.00           0.00          ~     (all equal)
TableMap      0.00           0.00          ~     (all equal)
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant