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

Upd/go version #18

Merged
merged 7 commits into from
Oct 4, 2023
Merged

Upd/go version #18

merged 7 commits into from
Oct 4, 2023

Conversation

carpawell
Copy link
Member

No description provided.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
No applicable changes were found (generics are another story).
Closes #14.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Also fix godot errors.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
Use github.com/twmb/murmur3 instead of github.com/spaolacci/murmur3. The last
one does not look as a maintained library. Also, no performance degradation
found:

```
goos: linux
goarch: amd64
pkg: github.com/nspcc-dev/hrw
cpu: Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz
                             │  getOld.txt  │              getNew.txt              │
                             │    sec/op    │    sec/op     vs base                │
Sort_fnv_10-8                  274.6n ± 10%   270.3n ±  2%        ~ (p=0.066 n=10)
Sort_fnv_100-8                 2.806µ ±  3%   2.857µ ±  1%        ~ (p=0.160 n=10)
Sort_fnv_1000-8                80.50µ ± 31%   71.21µ ±  1%  -11.54% (p=0.000 n=10)
SortByIndex_fnv_10-8           528.7n ±  3%   517.2n ±  3%   -2.18% (p=0.015 n=10)
SortByIndex_fnv_100-8          5.126µ ±  1%   5.202µ ±  1%   +1.50% (p=0.000 n=10)
SortByIndex_fnv_1000-8         102.8µ ±  3%   102.6µ ±  1%        ~ (p=0.869 n=10)
SortByValue_fnv_10-8           741.5n ±  8%   482.4n ±  4%  -34.94% (p=0.000 n=10)
SortByValue_fnv_100-8          5.443µ ± 17%   2.802µ ± 10%  -48.52% (p=0.000 n=10)
SortByValue_fnv_1000-8         47.76µ ± 30%   25.52µ ±  4%  -46.57% (p=0.000 n=10)
SortByWeight_fnv_10-8          388.4n ±  9%   360.0n ±  4%        ~ (p=0.079 n=10)
SortByWeight_fnv_100-8         1.432µ ± 14%   1.473µ ±  4%        ~ (p=0.197 n=10)
SortByWeight_fnv_1000-8        11.50µ ±  5%   11.69µ ±  8%        ~ (p=0.684 n=10)
SortByWeightIndex_fnv_10-8     442.0n ±  4%   433.2n ±  4%        ~ (p=0.342 n=10)
SortByWeightIndex_fnv_100-8    5.912µ ±  2%   6.026µ ±  1%   +1.92% (p=0.007 n=10)
SortByWeightIndex_fnv_1000-8   153.2µ ±  1%   154.1µ ±  1%        ~ (p=0.063 n=10)
SortByWeightValue_fnv_10-8     763.1n ±  2%   518.4n ±  3%  -32.07% (p=0.000 n=10)
SortByWeightValue_fnv_100-8    5.233µ ±  2%   3.062µ ±  3%  -41.50% (p=0.000 n=10)
SortByWeightValue_fnv_1000-8   49.08µ ±  1%   26.93µ ±  4%  -45.12% (p=0.000 n=10)
geomean                        4.776µ         3.954µ        -17.21%

                             │  getOld.txt  │               getNew.txt               │
                             │     B/op     │     B/op      vs base                  │
Sort_fnv_10-8                    216.0 ± 0%     216.0 ± 0%        ~ (p=1.000 n=10) ¹
Sort_fnv_100-8                 1.805Ki ± 0%   1.805Ki ± 0%        ~ (p=1.000 n=10) ¹
Sort_fnv_1000-8                16.05Ki ± 0%   16.05Ki ± 0%        ~ (p=1.000 n=10) ¹
SortByIndex_fnv_10-8             352.0 ± 0%     352.0 ± 0%        ~ (p=1.000 n=10) ¹
SortByIndex_fnv_100-8          1.938Ki ± 0%   1.938Ki ± 0%        ~ (p=1.000 n=10) ¹
SortByIndex_fnv_1000-8         16.19Ki ± 0%   16.19Ki ± 0%        ~ (p=1.000 n=10) ¹
SortByValue_fnv_10-8             592.0 ± 0%     432.0 ± 0%  -27.03% (p=0.000 n=10)
SortByValue_fnv_100-8          4.375Ki ± 0%   2.812Ki ± 0%  -35.71% (p=0.000 n=10)
SortByValue_fnv_1000-8         39.81Ki ± 0%   24.19Ki ± 0%  -39.25% (p=0.000 n=10)
SortByWeight_fnv_10-8            448.0 ± 0%     448.0 ± 0%        ~ (p=1.000 n=10) ¹
SortByWeight_fnv_100-8         2.828Ki ± 0%   2.828Ki ± 0%        ~ (p=1.000 n=10) ¹
SortByWeight_fnv_1000-8        24.20Ki ± 0%   24.20Ki ± 0%        ~ (p=1.000 n=10) ¹
SortByWeightIndex_fnv_10-8       368.0 ± 0%     368.0 ± 0%        ~ (p=1.000 n=10) ¹
SortByWeightIndex_fnv_100-8    1.953Ki ± 0%   1.953Ki ± 0%        ~ (p=1.000 n=10) ¹
SortByWeightIndex_fnv_1000-8   16.20Ki ± 0%   16.20Ki ± 0%        ~ (p=1.000 n=10) ¹
SortByWeightValue_fnv_10-8       608.0 ± 0%     448.0 ± 0%  -26.32% (p=0.000 n=10)
SortByWeightValue_fnv_100-8    4.391Ki ± 0%   2.828Ki ± 0%  -35.59% (p=0.000 n=10)
SortByWeightValue_fnv_1000-8   39.83Ki ± 0%   24.20Ki ± 0%  -39.23% (p=0.000 n=10)
geomean                        2.918Ki        2.539Ki       -12.96%
¹ all samples are equal

                             │  getOld.txt   │              getNew.txt              │
                             │   allocs/op   │ allocs/op   vs base                  │
Sort_fnv_10-8                     4.000 ± 0%   4.000 ± 0%        ~ (p=1.000 n=10) ¹
Sort_fnv_100-8                    4.000 ± 0%   4.000 ± 0%        ~ (p=1.000 n=10) ¹
Sort_fnv_1000-8                   4.000 ± 0%   4.000 ± 0%        ~ (p=1.000 n=10) ¹
SortByIndex_fnv_10-8              7.000 ± 0%   7.000 ± 0%        ~ (p=1.000 n=10) ¹
SortByIndex_fnv_100-8             7.000 ± 0%   7.000 ± 0%        ~ (p=1.000 n=10) ¹
SortByIndex_fnv_1000-8            7.000 ± 0%   7.000 ± 0%        ~ (p=1.000 n=10) ¹
SortByValue_fnv_10-8             18.000 ± 0%   8.000 ± 0%  -55.56% (p=0.000 n=10)
SortByValue_fnv_100-8           108.000 ± 0%   8.000 ± 0%  -92.59% (p=0.000 n=10)
SortByValue_fnv_1000-8         1008.000 ± 0%   8.000 ± 0%  -99.21% (p=0.000 n=10)
SortByWeight_fnv_10-8             8.000 ± 0%   8.000 ± 0%        ~ (p=1.000 n=10) ¹
SortByWeight_fnv_100-8            8.000 ± 0%   8.000 ± 0%        ~ (p=1.000 n=10) ¹
SortByWeight_fnv_1000-8           8.000 ± 0%   8.000 ± 0%        ~ (p=1.000 n=10) ¹
SortByWeightIndex_fnv_10-8        7.000 ± 0%   7.000 ± 0%        ~ (p=1.000 n=10) ¹
SortByWeightIndex_fnv_100-8       7.000 ± 0%   7.000 ± 0%        ~ (p=1.000 n=10) ¹
SortByWeightIndex_fnv_1000-8      7.000 ± 0%   7.000 ± 0%        ~ (p=1.000 n=10) ¹
SortByWeightValue_fnv_10-8       18.000 ± 0%   8.000 ± 0%  -55.56% (p=0.000 n=10)
SortByWeightValue_fnv_100-8     108.000 ± 0%   8.000 ± 0%  -92.59% (p=0.000 n=10)
SortByWeightValue_fnv_1000-8   1008.000 ± 0%   8.000 ± 0%  -99.21% (p=0.000 n=10)
geomean                           17.05        6.817       -60.01%
¹ all samples are equal
```
Closes #17.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
@roman-khimov roman-khimov merged commit 3ebf5fd into master Oct 4, 2023
5 checks passed
@roman-khimov roman-khimov deleted the upd/go-version branch October 4, 2023 08:06
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.

2 participants