go-hep / hep

hep is the mono repository holding all of go-hep.org/x/hep packages and tools
https://go-hep.org
BSD 3-Clause "New" or "Revised" License
230 stars 35 forks source link

sliceop{,/f64s}: introduce generics sliceop #931

Closed sbinet closed 2 years ago

sbinet commented 2 years ago

Move and generalize code from sliceop/f64s into sliceop.

name                old time/op    new time/op    delta
Take/Len=2-8          2.69ns ± 1%    2.71ns ± 2%   +0.75%  (p=0.043 n=18+18)
Take/Len=4-8          3.18ns ± 1%    3.23ns ± 3%   +1.27%  (p=0.005 n=19+20)
Take/Len=8-8          3.83ns ± 1%    3.73ns ± 1%   -2.69%  (p=0.000 n=20+19)
Take/Len=128-8        44.1ns ± 4%    35.9ns ± 2%  -18.61%  (p=0.000 n=20+20)
Take/Len=1024-8        337ns ± 2%     280ns ± 6%  -16.73%  (p=0.000 n=19+20)
Take/Len=1048576-8    1.37ms ± 3%    1.31ms ± 5%   -3.97%  (p=0.000 n=19+20)

name                old alloc/op   new alloc/op   delta
Take/Len=2-8           0.00B          0.00B          ~     (all equal)
Take/Len=4-8           0.00B          0.00B          ~     (all equal)
Take/Len=8-8           0.00B          0.00B          ~     (all equal)
Take/Len=128-8         0.00B          0.00B          ~     (all equal)
Take/Len=1024-8        0.00B          0.00B          ~     (all equal)
Take/Len=1048576-8     0.00B          0.00B          ~     (all equal)

name                old allocs/op  new allocs/op  delta
Take/Len=2-8            0.00           0.00          ~     (all equal)
Take/Len=4-8            0.00           0.00          ~     (all equal)
Take/Len=8-8            0.00           0.00          ~     (all equal)
Take/Len=128-8          0.00           0.00          ~     (all equal)
Take/Len=1024-8         0.00           0.00          ~     (all equal)
Take/Len=1048576-8      0.00           0.00          ~     (all equal)

Updates go-hep/hep#868.

codecov-commenter commented 2 years ago

Codecov Report

Merging #931 (2b4b393) into main (582dce6) will increase coverage by 0.00%. The diff coverage is 100.00%.

:exclamation: Current head 2b4b393 differs from pull request most recent head 4f927c3. Consider uploading reports for the commit 4f927c3 to get more accurate results

@@           Coverage Diff           @@
##             main     #931   +/-   ##
=======================================
  Coverage   73.77%   73.77%           
=======================================
  Files         409      410    +1     
  Lines       48789    48793    +4     
=======================================
+ Hits        35994    35998    +4     
  Misses      10511    10511           
  Partials     2284     2284           
Impacted Files Coverage Δ
sliceop/f64s/f64s.go 100.00% <100.00%> (ø)
sliceop/sliceop.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 582dce6...4f927c3. Read the comment docs.