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

Make Slicer interface more generic #466

Merged
merged 11 commits into from
Jul 29, 2023

Commits on Jul 28, 2023

  1. slicer: Reuse PayloadStream for Slice method

    Signed-off-by: Evgenii Baidakov <[email protected]>
    smallhive committed Jul 28, 2023
    Configuration menu
    Copy the full SHA
    5652c90 View commit details
    Browse the repository at this point in the history
  2. client: Make ObjectWriter io.WriteCloser compatible

    Signed-off-by: Evgenii Baidakov <[email protected]>
    smallhive committed Jul 28, 2023
    Configuration menu
    Copy the full SHA
    61fc4bc View commit details
    Browse the repository at this point in the history
  3. client: Remove client's integration with slicer

    Signed-off-by: Evgenii Baidakov <[email protected]>
    smallhive committed Jul 28, 2023
    Configuration menu
    Copy the full SHA
    8024f70 View commit details
    Browse the repository at this point in the history
  4. slicer: Unify slicer.ObjectWriter for be compatibility with client an…

    …d pool
    
    Signed-off-by: Evgenii Baidakov <[email protected]>
    smallhive committed Jul 28, 2023
    Configuration menu
    Copy the full SHA
    a15e27c View commit details
    Browse the repository at this point in the history
  5. slicer: Replace string attributes with object.Attribute

    Signed-off-by: Evgenii Baidakov <[email protected]>
    smallhive committed Jul 28, 2023
    Configuration menu
    Copy the full SHA
    892aff8 View commit details
    Browse the repository at this point in the history
  6. slicer: Make Slicer interface more generic

    closes #442
    
    Signed-off-by: Evgenii Baidakov <[email protected]>
    smallhive committed Jul 28, 2023
    Configuration menu
    Copy the full SHA
    025c694 View commit details
    Browse the repository at this point in the history
  7. slicer: Remove unused err

    Signed-off-by: Evgenii Baidakov <[email protected]>
    smallhive committed Jul 28, 2023
    Configuration menu
    Copy the full SHA
    23e8c4c View commit details
    Browse the repository at this point in the history
  8. slicer: Add slicer tests for all object types

    Signed-off-by: Evgenii Baidakov <[email protected]>
    smallhive committed Jul 28, 2023
    Configuration menu
    Copy the full SHA
    47b9bac View commit details
    Browse the repository at this point in the history
  9. slicer: Skip object meta evaluation, if it is already done

    Updated after benchmark. For the header object we already made flushObjectMetadata step in _writeChild and don't need to compute this data again.
    
                                                     │   old.txt    │              new.txt               │
                                                     │    sec/op    │   sec/op     vs base               │
    SliceDataIntoObjects/slice_1-128/reader-16         116.55µ ± 1%   62.61µ ± 1%  -46.28% (p=0.002 n=6)
    SliceDataIntoObjects/slice_1-128/writer-16         121.73µ ± 2%   64.94µ ± 1%  -46.65% (p=0.002 n=6)
    SliceDataIntoObjects/slice_4-128/reader-16         111.50µ ± 3%   65.48µ ± 1%  -41.27% (p=0.002 n=6)
    SliceDataIntoObjects/slice_4-128/writer-16         113.84µ ± 1%   67.38µ ± 2%  -40.81% (p=0.002 n=6)
    SliceDataIntoObjects/slice_16-128/reader-16        110.43µ ± 1%   61.57µ ± 2%  -44.25% (p=0.002 n=6)
    SliceDataIntoObjects/slice_16-128/writer-16        115.11µ ± 1%   63.93µ ± 1%  -44.46% (p=0.002 n=6)
    SliceDataIntoObjects/slice_64-128/reader-16        109.10µ ± 1%   64.89µ ± 1%  -40.53% (p=0.002 n=6)
    SliceDataIntoObjects/slice_64-128/writer-16        114.07µ ± 1%   67.24µ ± 1%  -41.05% (p=0.002 n=6)
    SliceDataIntoObjects/slice_256-128/reader-16       108.68µ ± 1%   61.19µ ± 1%  -43.70% (p=0.002 n=6)
    SliceDataIntoObjects/slice_256-128/writer-16        233.2µ ± 0%   236.2µ ± 2%        ~ (p=0.093 n=6)
    SliceDataIntoObjects/slice_1024-128/reader-16      109.04µ ± 1%   64.34µ ± 1%  -41.00% (p=0.002 n=6)
    SliceDataIntoObjects/slice_1024-128/writer-16       554.6µ ± 0%   569.6µ ± 2%   +2.71% (p=0.002 n=6)
    SliceDataIntoObjects/slice_4096-128/reader-16      114.62µ ± 0%   63.45µ ± 1%  -44.65% (p=0.002 n=6)
    SliceDataIntoObjects/slice_4096-128/writer-16       1.855m ± 2%   1.865m ± 1%        ~ (p=0.180 n=6)
    SliceDataIntoObjects/slice_16384-128/reader-16     117.09µ ± 3%   67.15µ ± 0%  -42.65% (p=0.002 n=6)
    SliceDataIntoObjects/slice_16384-128/writer-16      7.745m ± 2%   7.889m ± 1%   +1.86% (p=0.026 n=6)
    SliceDataIntoObjects/slice_65536-128/reader-16     118.90µ ± 1%   67.12µ ± 1%  -43.55% (p=0.002 n=6)
    SliceDataIntoObjects/slice_65536-128/writer-16      30.71m ± 1%   31.07m ± 0%   +1.20% (p=0.002 n=6)
    SliceDataIntoObjects/slice_262144-128/reader-16    124.95µ ± 2%   72.49µ ± 1%  -41.98% (p=0.002 n=6)
    SliceDataIntoObjects/slice_262144-128/writer-16     124.0m ± 1%   112.7m ± 0%   -9.15% (p=0.002 n=6)
    SliceDataIntoObjects/slice_1048576-128/reader-16    184.8µ ± 2%   125.1µ ± 3%  -32.30% (p=0.002 n=6)
    SliceDataIntoObjects/slice_1048576-128/writer-16    453.8m ± 1%   518.8m ± 2%  +14.32% (p=0.002 n=6)
    geomean                                             461.0µ        318.0µ       -31.02%
    
                                                     │    old.txt    │               new.txt                │
                                                     │     B/op      │     B/op       vs base               │
    SliceDataIntoObjects/slice_1-128/reader-16         16.880Ki ± 0%    9.453Ki ± 0%  -44.00% (p=0.002 n=6)
    SliceDataIntoObjects/slice_1-128/writer-16         18.100Ki ± 0%    9.344Ki ± 0%  -48.38% (p=0.002 n=6)
    SliceDataIntoObjects/slice_4-128/reader-16          14.75Ki ± 0%    10.33Ki ± 0%  -29.99% (p=0.002 n=6)
    SliceDataIntoObjects/slice_4-128/writer-16          15.91Ki ± 0%    10.22Ki ± 0%  -35.77% (p=0.002 n=6)
    SliceDataIntoObjects/slice_16-128/reader-16        14.504Ki ± 0%    8.984Ki ± 0%  -38.06% (p=0.002 n=6)
    SliceDataIntoObjects/slice_16-128/writer-16        15.724Ki ± 0%    8.968Ki ± 0%  -42.97% (p=0.002 n=6)
    SliceDataIntoObjects/slice_64-128/reader-16         13.63Ki ± 0%    10.33Ki ± 0%  -24.21% (p=0.002 n=6)
    SliceDataIntoObjects/slice_64-128/writer-16         14.85Ki ± 0%    10.22Ki ± 0%  -31.17% (p=0.002 n=6)
    SliceDataIntoObjects/slice_256-128/reader-16       14.005Ki ± 0%    8.985Ki ± 0%  -35.84% (p=0.002 n=6)
    SliceDataIntoObjects/slice_256-128/writer-16        31.33Ki ± 0%    31.18Ki ± 0%   -0.47% (p=0.002 n=6)
    SliceDataIntoObjects/slice_1024-128/reader-16      14.008Ki ± 0%    9.864Ki ± 0%  -29.58% (p=0.002 n=6)
    SliceDataIntoObjects/slice_1024-128/writer-16       74.32Ki ± 0%    81.16Ki ± 0%   +9.21% (p=0.002 n=6)
    SliceDataIntoObjects/slice_4096-128/reader-16      16.528Ki ± 0%    9.874Ki ± 0%  -40.26% (p=0.002 n=6)
    SliceDataIntoObjects/slice_4096-128/writer-16       250.8Ki ± 0%    266.2Ki ± 0%   +6.13% (p=0.002 n=6)
    SliceDataIntoObjects/slice_16384-128/reader-16      16.34Ki ± 0%    11.14Ki ± 0%  -31.82% (p=0.002 n=6)
    SliceDataIntoObjects/slice_16384-128/writer-16      965.2Ki ± 0%   1038.0Ki ± 0%   +7.55% (p=0.002 n=6)
    SliceDataIntoObjects/slice_65536-128/reader-16      17.27Ki ± 0%    10.97Ki ± 0%  -36.50% (p=0.002 n=6)
    SliceDataIntoObjects/slice_65536-128/writer-16      3.711Mi ± 0%    3.981Mi ± 0%   +7.27% (p=0.002 n=6)
    SliceDataIntoObjects/slice_262144-128/reader-16     16.04Ki ± 0%    11.41Ki ± 0%  -28.86% (p=0.002 n=6)
    SliceDataIntoObjects/slice_262144-128/writer-16     14.88Mi ± 0%    15.53Mi ± 0%   +4.34% (p=0.002 n=6)
    SliceDataIntoObjects/slice_1048576-128/reader-16    23.04Ki ± 1%    17.77Ki ± 3%  -22.87% (p=0.002 n=6)
    SliceDataIntoObjects/slice_1048576-128/writer-16    57.72Mi ± 0%    63.79Mi ± 0%  +10.51% (p=0.002 n=6)
    geomean                                             61.36Ki         46.61Ki       -24.04%
    
                                                     │   old.txt   │               new.txt               │
                                                     │  allocs/op  │  allocs/op    vs base               │
    SliceDataIntoObjects/slice_1-128/reader-16          254.0 ± 0%     149.0 ± 0%  -41.34% (p=0.002 n=6)
    SliceDataIntoObjects/slice_1-128/writer-16          276.0 ± 0%     148.0 ± 0%  -46.38% (p=0.002 n=6)
    SliceDataIntoObjects/slice_4-128/reader-16          223.0 ± 0%     161.0 ± 0%  -27.80% (p=0.002 n=6)
    SliceDataIntoObjects/slice_4-128/writer-16          244.0 ± 0%     160.0 ± 0%  -34.43% (p=0.002 n=6)
    SliceDataIntoObjects/slice_16-128/reader-16         218.0 ± 0%     142.0 ± 0%  -34.86% (p=0.002 n=6)
    SliceDataIntoObjects/slice_16-128/writer-16         240.0 ± 0%     143.0 ± 0%  -40.42% (p=0.002 n=6)
    SliceDataIntoObjects/slice_64-128/reader-16         204.0 ± 0%     161.0 ± 0%  -21.08% (p=0.002 n=6)
    SliceDataIntoObjects/slice_64-128/writer-16         226.0 ± 0%     160.0 ± 0%  -29.20% (p=0.002 n=6)
    SliceDataIntoObjects/slice_256-128/reader-16        211.0 ± 0%     142.0 ± 0%  -32.70% (p=0.002 n=6)
    SliceDataIntoObjects/slice_256-128/writer-16        472.0 ± 0%     478.0 ± 0%   +1.27% (p=0.002 n=6)
    SliceDataIntoObjects/slice_1024-128/reader-16       211.0 ± 0%     155.0 ± 0%  -26.54% (p=0.002 n=6)
    SliceDataIntoObjects/slice_1024-128/writer-16      1.140k ± 0%    1.283k ± 0%  +12.54% (p=0.002 n=6)
    SliceDataIntoObjects/slice_4096-128/reader-16       247.0 ± 0%     155.0 ± 0%  -37.25% (p=0.002 n=6)
    SliceDataIntoObjects/slice_4096-128/writer-16      3.884k ± 0%    4.237k ± 0%   +9.10% (p=0.002 n=6)
    SliceDataIntoObjects/slice_16384-128/reader-16      243.0 ± 0%     172.0 ± 0%  -29.22% (p=0.002 n=6)
    SliceDataIntoObjects/slice_16384-128/writer-16     14.91k ± 0%    16.51k ± 0%  +10.70% (p=0.002 n=6)
    SliceDataIntoObjects/slice_65536-128/reader-16      259.0 ± 0%     169.0 ± 0%  -34.75% (p=0.002 n=6)
    SliceDataIntoObjects/slice_65536-128/writer-16     58.73k ± 0%    64.87k ± 0%  +10.47% (p=0.002 n=6)
    SliceDataIntoObjects/slice_262144-128/reader-16     240.0 ± 0%     178.0 ± 1%  -25.83% (p=0.002 n=6)
    SliceDataIntoObjects/slice_262144-128/writer-16    233.8k ± 0%    252.3k ± 0%   +7.92% (p=0.002 n=6)
    SliceDataIntoObjects/slice_1048576-128/reader-16    340.5 ± 1%     279.5 ± 3%  -17.91% (p=0.002 n=6)
    SliceDataIntoObjects/slice_1048576-128/writer-16   909.8k ± 0%   1032.7k ± 0%  +13.51% (p=0.002 n=6)
    geomean                                             930.0          732.6       -21.23%
    
    Signed-off-by: Evgenii Baidakov <[email protected]>
    smallhive committed Jul 28, 2023
    Configuration menu
    Copy the full SHA
    d0cfea7 View commit details
    Browse the repository at this point in the history
  10. slicer: Reuse PrmObjectPutInit

    Updated after benchmark. During object slicing we recreate PrmObjectPutInit for each part, we may reuse it.
    
                                                     │   old.txt   │              new.txt               │
                                                     │   sec/op    │   sec/op     vs base               │
    SliceDataIntoObjects/slice_1-128/reader-16         62.61µ ± 1%   62.90µ ± 0%        ~ (p=0.132 n=6)
    SliceDataIntoObjects/slice_1-128/writer-16         64.94µ ± 1%   65.30µ ± 1%        ~ (p=0.394 n=6)
    SliceDataIntoObjects/slice_4-128/reader-16         65.48µ ± 1%   61.19µ ± 1%   -6.56% (p=0.002 n=6)
    SliceDataIntoObjects/slice_4-128/writer-16         67.38µ ± 2%   63.62µ ± 1%   -5.59% (p=0.002 n=6)
    SliceDataIntoObjects/slice_16-128/reader-16        61.57µ ± 2%   63.15µ ± 1%   +2.57% (p=0.002 n=6)
    SliceDataIntoObjects/slice_16-128/writer-16        63.93µ ± 1%   64.99µ ± 1%   +1.66% (p=0.004 n=6)
    SliceDataIntoObjects/slice_64-128/reader-16        64.89µ ± 1%   66.61µ ± 1%   +2.66% (p=0.002 n=6)
    SliceDataIntoObjects/slice_64-128/writer-16        67.24µ ± 1%   71.96µ ± 2%   +7.02% (p=0.002 n=6)
    SliceDataIntoObjects/slice_256-128/reader-16       61.19µ ± 1%   65.92µ ± 1%   +7.73% (p=0.002 n=6)
    SliceDataIntoObjects/slice_256-128/writer-16       236.2µ ± 2%   252.7µ ± 1%   +6.97% (p=0.002 n=6)
    SliceDataIntoObjects/slice_1024-128/reader-16      64.34µ ± 1%   64.30µ ± 2%        ~ (p=0.937 n=6)
    SliceDataIntoObjects/slice_1024-128/writer-16      569.6µ ± 2%   611.3µ ± 2%   +7.32% (p=0.002 n=6)
    SliceDataIntoObjects/slice_4096-128/reader-16      63.45µ ± 1%   67.79µ ± 1%   +6.85% (p=0.002 n=6)
    SliceDataIntoObjects/slice_4096-128/writer-16      1.865m ± 1%   2.073m ± 1%  +11.16% (p=0.002 n=6)
    SliceDataIntoObjects/slice_16384-128/reader-16     67.15µ ± 0%   64.50µ ± 1%   -3.95% (p=0.002 n=6)
    SliceDataIntoObjects/slice_16384-128/writer-16     7.889m ± 1%   7.067m ± 1%  -10.42% (p=0.002 n=6)
    SliceDataIntoObjects/slice_65536-128/reader-16     67.12µ ± 1%   65.98µ ± 1%   -1.70% (p=0.002 n=6)
    SliceDataIntoObjects/slice_65536-128/writer-16     31.07m ± 0%   31.06m ± 1%        ~ (p=1.000 n=6)
    SliceDataIntoObjects/slice_262144-128/reader-16    72.49µ ± 1%   73.88µ ± 1%   +1.91% (p=0.002 n=6)
    SliceDataIntoObjects/slice_262144-128/writer-16    112.7m ± 0%   112.6m ± 0%        ~ (p=0.699 n=6)
    SliceDataIntoObjects/slice_1048576-128/reader-16   125.1µ ± 3%   125.1µ ± 3%        ~ (p=0.818 n=6)
    SliceDataIntoObjects/slice_1048576-128/writer-16   518.8m ± 2%   510.0m ± 1%   -1.71% (p=0.026 n=6)
    geomean                                            318.0µ        321.5µ        +1.09%
    
                                                     │    old.txt    │               new.txt                │
                                                     │     B/op      │     B/op       vs base               │
    SliceDataIntoObjects/slice_1-128/reader-16          9.453Ki ± 0%    9.547Ki ± 0%   +0.99% (p=0.002 n=6)
    SliceDataIntoObjects/slice_1-128/writer-16          9.344Ki ± 0%    9.438Ki ± 0%   +1.00% (p=0.002 n=6)
    SliceDataIntoObjects/slice_4-128/reader-16         10.329Ki ± 0%    9.077Ki ± 0%  -12.12% (p=0.002 n=6)
    SliceDataIntoObjects/slice_4-128/writer-16         10.220Ki ± 0%    8.968Ki ± 0%  -12.25% (p=0.002 n=6)
    SliceDataIntoObjects/slice_16-128/reader-16         8.984Ki ± 0%    9.547Ki ± 0%   +6.26% (p=0.002 n=6)
    SliceDataIntoObjects/slice_16-128/writer-16         8.968Ki ± 0%    9.438Ki ± 0%   +5.24% (p=0.002 n=6)
    SliceDataIntoObjects/slice_64-128/reader-16         10.33Ki ± 0%    11.17Ki ± 0%   +8.17% (p=0.002 n=6)
    SliceDataIntoObjects/slice_64-128/writer-16         10.22Ki ± 0%    11.06Ki ± 0%   +8.26% (p=0.002 n=6)
    SliceDataIntoObjects/slice_256-128/reader-16        8.985Ki ± 0%   10.893Ki ± 0%  +21.23% (p=0.002 n=6)
    SliceDataIntoObjects/slice_256-128/writer-16        31.18Ki ± 0%    38.08Ki ± 0%  +22.11% (p=0.002 n=6)
    SliceDataIntoObjects/slice_1024-128/reader-16       9.864Ki ± 0%    9.425Ki ± 0%   -4.46% (p=0.002 n=6)
    SliceDataIntoObjects/slice_1024-128/writer-16       81.16Ki ± 0%    75.66Ki ± 0%   -6.78% (p=0.002 n=6)
    SliceDataIntoObjects/slice_4096-128/reader-16       9.874Ki ± 0%   11.188Ki ± 0%  +13.30% (p=0.002 n=6)
    SliceDataIntoObjects/slice_4096-128/writer-16       266.2Ki ± 0%    260.8Ki ± 0%   -2.01% (p=0.002 n=6)
    SliceDataIntoObjects/slice_16384-128/reader-16      11.14Ki ± 0%    10.00Ki ± 0%  -10.18% (p=0.002 n=6)
    SliceDataIntoObjects/slice_16384-128/writer-16     1038.0Ki ± 0%    936.3Ki ± 0%   -9.81% (p=0.002 n=6)
    SliceDataIntoObjects/slice_65536-128/reader-16      10.97Ki ± 0%    10.10Ki ± 0%   -7.89% (p=0.002 n=6)
    SliceDataIntoObjects/slice_65536-128/writer-16      3.981Mi ± 0%    3.708Mi ± 0%   -6.86% (p=0.002 n=6)
    SliceDataIntoObjects/slice_262144-128/reader-16     11.41Ki ± 0%    11.92Ki ± 0%   +4.41% (p=0.002 n=6)
    SliceDataIntoObjects/slice_262144-128/writer-16     15.53Mi ± 0%    14.45Mi ± 0%   -6.94% (p=0.002 n=6)
    SliceDataIntoObjects/slice_1048576-128/reader-16    17.77Ki ± 3%    18.17Ki ± 3%   +2.24% (p=0.002 n=6)
    SliceDataIntoObjects/slice_1048576-128/writer-16    63.79Mi ± 0%    59.48Mi ± 0%   -6.76% (p=0.002 n=6)
    geomean                                             46.61Ki         46.55Ki        -0.13%
    
                                                     │   old.txt    │               new.txt                │
                                                     │  allocs/op   │  allocs/op   vs base                 │
    SliceDataIntoObjects/slice_1-128/reader-16           149.0 ± 0%    149.0 ± 0%        ~ (p=1.000 n=6) ¹
    SliceDataIntoObjects/slice_1-128/writer-16           148.0 ± 0%    148.0 ± 0%        ~ (p=1.000 n=6) ¹
    SliceDataIntoObjects/slice_4-128/reader-16           161.0 ± 0%    142.0 ± 0%  -11.80% (p=0.002 n=6)
    SliceDataIntoObjects/slice_4-128/writer-16           160.0 ± 0%    141.0 ± 0%  -11.88% (p=0.002 n=6)
    SliceDataIntoObjects/slice_16-128/reader-16          142.0 ± 0%    149.0 ± 0%   +4.93% (p=0.002 n=6)
    SliceDataIntoObjects/slice_16-128/writer-16          143.0 ± 0%    148.0 ± 0%   +3.50% (p=0.002 n=6)
    SliceDataIntoObjects/slice_64-128/reader-16          161.0 ± 0%    172.0 ± 0%   +6.83% (p=0.002 n=6)
    SliceDataIntoObjects/slice_64-128/writer-16          160.0 ± 0%    171.0 ± 0%   +6.88% (p=0.002 n=6)
    SliceDataIntoObjects/slice_256-128/reader-16         142.0 ± 0%    167.0 ± 0%  +17.61% (p=0.002 n=6)
    SliceDataIntoObjects/slice_256-128/writer-16         478.0 ± 0%    583.0 ± 0%  +21.97% (p=0.002 n=6)
    SliceDataIntoObjects/slice_1024-128/reader-16        155.0 ± 0%    147.0 ± 0%   -5.16% (p=0.002 n=6)
    SliceDataIntoObjects/slice_1024-128/writer-16       1.283k ± 0%   1.155k ± 0%   -9.98% (p=0.002 n=6)
    SliceDataIntoObjects/slice_4096-128/reader-16        155.0 ± 0%    172.0 ± 0%  +10.97% (p=0.002 n=6)
    SliceDataIntoObjects/slice_4096-128/writer-16       4.237k ± 0%   4.021k ± 0%   -5.11% (p=0.002 n=6)
    SliceDataIntoObjects/slice_16384-128/reader-16       172.0 ± 0%    155.0 ± 0%   -9.88% (p=0.002 n=6)
    SliceDataIntoObjects/slice_16384-128/writer-16      16.51k ± 0%   14.51k ± 0%  -12.07% (p=0.002 n=6)
    SliceDataIntoObjects/slice_65536-128/reader-16       169.0 ± 0%    157.0 ± 0%   -7.10% (p=0.002 n=6)
    SliceDataIntoObjects/slice_65536-128/writer-16      64.87k ± 0%   58.66k ± 0%   -9.57% (p=0.002 n=6)
    SliceDataIntoObjects/slice_262144-128/reader-16      178.0 ± 1%    182.0 ± 0%   +2.25% (p=0.002 n=6)
    SliceDataIntoObjects/slice_262144-128/writer-16     252.3k ± 0%   227.8k ± 0%   -9.73% (p=0.002 n=6)
    SliceDataIntoObjects/slice_1048576-128/reader-16     279.5 ± 3%    279.0 ± 3%        ~ (p=0.790 n=6)
    SliceDataIntoObjects/slice_1048576-128/writer-16   1032.7k ± 0%   934.5k ± 0%   -9.51% (p=0.002 n=6)
    geomean                                              732.6         720.3        -1.67%
    
    Signed-off-by: Evgenii Baidakov <[email protected]>
    smallhive committed Jul 28, 2023
    Configuration menu
    Copy the full SHA
    8b7c80b View commit details
    Browse the repository at this point in the history
  11. slicer: Reuse stub object

    Updated after benchmark. During object slicing we create object for each part, we may reuse it, just resetting some fields.
    
                                                     │   old.txt   │               new.txt               │
                                                     │   sec/op    │    sec/op     vs base               │
    SliceDataIntoObjects/slice_1-128/reader-16         62.90µ ± 0%   62.77µ ±  0%        ~ (p=0.589 n=6)
    SliceDataIntoObjects/slice_1-128/writer-16         65.30µ ± 1%   65.82µ ±  0%   +0.80% (p=0.002 n=6)
    SliceDataIntoObjects/slice_4-128/reader-16         61.19µ ± 1%   67.40µ ±  1%  +10.16% (p=0.002 n=6)
    SliceDataIntoObjects/slice_4-128/writer-16         63.62µ ± 1%   70.42µ ±  2%  +10.69% (p=0.002 n=6)
    SliceDataIntoObjects/slice_16-128/reader-16        63.15µ ± 1%   65.74µ ±  1%   +4.10% (p=0.002 n=6)
    SliceDataIntoObjects/slice_16-128/writer-16        64.99µ ± 1%   68.16µ ±  1%   +4.87% (p=0.002 n=6)
    SliceDataIntoObjects/slice_64-128/reader-16        66.61µ ± 1%   66.09µ ±  1%        ~ (p=0.093 n=6)
    SliceDataIntoObjects/slice_64-128/writer-16        71.96µ ± 2%   77.10µ ±  7%   +7.14% (p=0.041 n=6)
    SliceDataIntoObjects/slice_256-128/reader-16       65.92µ ± 1%   70.01µ ± 10%        ~ (p=0.394 n=6)
    SliceDataIntoObjects/slice_256-128/writer-16       252.7µ ± 1%   234.0µ ±  1%   -7.42% (p=0.002 n=6)
    SliceDataIntoObjects/slice_1024-128/reader-16      64.30µ ± 2%   65.18µ ±  6%        ~ (p=0.240 n=6)
    SliceDataIntoObjects/slice_1024-128/writer-16      611.3µ ± 2%   570.0µ ±  5%   -6.76% (p=0.002 n=6)
    SliceDataIntoObjects/slice_4096-128/reader-16      67.79µ ± 1%   69.01µ ±  3%   +1.80% (p=0.002 n=6)
    SliceDataIntoObjects/slice_4096-128/writer-16      2.073m ± 1%   2.024m ±  3%   -2.39% (p=0.026 n=6)
    SliceDataIntoObjects/slice_16384-128/reader-16     64.50µ ± 1%   64.07µ ±  0%   -0.66% (p=0.026 n=6)
    SliceDataIntoObjects/slice_16384-128/writer-16     7.067m ± 1%   6.792m ±  8%        ~ (p=0.065 n=6)
    SliceDataIntoObjects/slice_65536-128/reader-16     65.98µ ± 1%   69.42µ ±  1%   +5.22% (p=0.002 n=6)
    SliceDataIntoObjects/slice_65536-128/writer-16     31.06m ± 1%   30.11m ±  1%   -3.07% (p=0.002 n=6)
    SliceDataIntoObjects/slice_262144-128/reader-16    73.88µ ± 1%   76.69µ ±  3%   +3.81% (p=0.002 n=6)
    SliceDataIntoObjects/slice_262144-128/writer-16    112.6m ± 0%   123.6m ±  4%   +9.76% (p=0.002 n=6)
    SliceDataIntoObjects/slice_1048576-128/reader-16   125.1µ ± 3%   106.8µ ± 12%  -14.61% (p=0.002 n=6)
    SliceDataIntoObjects/slice_1048576-128/writer-16   510.0m ± 1%   444.4m ±  1%  -12.85% (p=0.002 n=6)
    geomean                                            321.5µ        322.7µ         +0.37%
    
                                                     │    old.txt    │               new.txt                │
                                                     │     B/op      │     B/op       vs base               │
    SliceDataIntoObjects/slice_1-128/reader-16          9.547Ki ± 0%    9.547Ki ± 0%        ~ (p=1.000 n=6)
    SliceDataIntoObjects/slice_1-128/writer-16          9.438Ki ± 0%    9.421Ki ± 0%   -0.18% (p=0.002 n=6)
    SliceDataIntoObjects/slice_4-128/reader-16          9.077Ki ± 0%   11.298Ki ± 0%  +24.46% (p=0.002 n=6)
    SliceDataIntoObjects/slice_4-128/writer-16          8.968Ki ± 0%   11.173Ki ± 0%  +24.59% (p=0.002 n=6)
    SliceDataIntoObjects/slice_16-128/reader-16         9.547Ki ± 0%   10.548Ki ± 0%  +10.48% (p=0.002 n=6)
    SliceDataIntoObjects/slice_16-128/writer-16         9.438Ki ± 0%   10.423Ki ± 0%  +10.44% (p=0.002 n=6)
    SliceDataIntoObjects/slice_64-128/reader-16         11.17Ki ± 0%    10.55Ki ± 0%   -5.59% (p=0.002 n=6)
    SliceDataIntoObjects/slice_64-128/writer-16         11.06Ki ± 0%    10.42Ki ± 0%   -5.79% (p=0.002 n=6)
    SliceDataIntoObjects/slice_256-128/reader-16       10.893Ki ± 0%    9.204Ki ± 0%  -15.50% (p=0.002 n=6)
    SliceDataIntoObjects/slice_256-128/writer-16        38.08Ki ± 0%    29.42Ki ± 0%  -22.73% (p=0.002 n=6)
    SliceDataIntoObjects/slice_1024-128/reader-16       9.425Ki ± 0%    9.675Ki ± 0%   +2.65% (p=0.002 n=6)
    SliceDataIntoObjects/slice_1024-128/writer-16       75.66Ki ± 0%    69.60Ki ± 0%   -8.01% (p=0.002 n=6)
    SliceDataIntoObjects/slice_4096-128/reader-16       11.19Ki ± 0%    11.31Ki ± 0%   +1.11% (p=0.002 n=6)
    SliceDataIntoObjects/slice_4096-128/writer-16       260.8Ki ± 0%    235.7Ki ± 0%   -9.65% (p=0.002 n=6)
    SliceDataIntoObjects/slice_16384-128/reader-16     10.004Ki ± 0%    9.716Ki ± 0%   -2.88% (p=0.002 n=6)
    SliceDataIntoObjects/slice_16384-128/writer-16      936.3Ki ± 0%    831.3Ki ± 0%  -11.21% (p=0.002 n=6)
    SliceDataIntoObjects/slice_65536-128/reader-16      10.10Ki ± 0%    11.50Ki ± 0%  +13.79% (p=0.002 n=6)
    SliceDataIntoObjects/slice_65536-128/writer-16      3.708Mi ± 0%    3.307Mi ± 0%  -10.80% (p=0.002 n=6)
    SliceDataIntoObjects/slice_262144-128/reader-16     11.92Ki ± 0%    12.32Ki ± 0%   +3.36% (p=0.002 n=6)
    SliceDataIntoObjects/slice_262144-128/writer-16     14.45Mi ± 0%    13.26Mi ± 0%   -8.21% (p=0.002 n=6)
    SliceDataIntoObjects/slice_1048576-128/reader-16    18.17Ki ± 3%    15.16Ki ± 6%  -16.53% (p=0.002 n=6)
    SliceDataIntoObjects/slice_1048576-128/writer-16    59.48Mi ± 0%    51.22Mi ± 0%  -13.89% (p=0.002 n=6)
    geomean                                             46.55Ki         45.35Ki        -2.56%
    
                                                     │   old.txt   │               new.txt                │
                                                     │  allocs/op  │  allocs/op   vs base                 │
    SliceDataIntoObjects/slice_1-128/reader-16          149.0 ± 0%    149.0 ± 0%        ~ (p=1.000 n=6) ¹
    SliceDataIntoObjects/slice_1-128/writer-16          148.0 ± 0%    148.0 ± 0%        ~ (p=1.000 n=6) ¹
    SliceDataIntoObjects/slice_4-128/reader-16          142.0 ± 0%    174.0 ± 0%  +22.54% (p=0.002 n=6)
    SliceDataIntoObjects/slice_4-128/writer-16          141.0 ± 0%    173.0 ± 0%  +22.70% (p=0.002 n=6)
    SliceDataIntoObjects/slice_16-128/reader-16         149.0 ± 0%    163.0 ± 0%   +9.40% (p=0.002 n=6)
    SliceDataIntoObjects/slice_16-128/writer-16         148.0 ± 0%    162.0 ± 0%   +9.46% (p=0.002 n=6)
    SliceDataIntoObjects/slice_64-128/reader-16         172.0 ± 0%    163.0 ± 0%   -5.23% (p=0.002 n=6)
    SliceDataIntoObjects/slice_64-128/writer-16         171.0 ± 0%    162.0 ± 0%   -5.26% (p=0.002 n=6)
    SliceDataIntoObjects/slice_256-128/reader-16        167.0 ± 0%    144.0 ± 0%  -13.77% (p=0.002 n=6)
    SliceDataIntoObjects/slice_256-128/writer-16        583.0 ± 0%    437.0 ± 0%  -25.04% (p=0.002 n=6)
    SliceDataIntoObjects/slice_1024-128/reader-16       147.0 ± 0%    151.0 ± 0%   +2.72% (p=0.002 n=6)
    SliceDataIntoObjects/slice_1024-128/writer-16      1.155k ± 0%   1.030k ± 0%  -10.82% (p=0.002 n=6)
    SliceDataIntoObjects/slice_4096-128/reader-16       172.0 ± 0%    174.0 ± 0%   +1.16% (p=0.002 n=6)
    SliceDataIntoObjects/slice_4096-128/writer-16      4.021k ± 0%   3.464k ± 0%  -13.85% (p=0.002 n=6)
    SliceDataIntoObjects/slice_16384-128/reader-16      155.0 ± 0%    151.0 ± 0%   -2.58% (p=0.002 n=6)
    SliceDataIntoObjects/slice_16384-128/writer-16     14.51k ± 0%   12.20k ± 0%  -15.96% (p=0.002 n=6)
    SliceDataIntoObjects/slice_65536-128/reader-16      157.0 ± 0%    176.0 ± 0%  +12.10% (p=0.002 n=6)
    SliceDataIntoObjects/slice_65536-128/writer-16     58.66k ± 0%   49.56k ± 0%  -15.52% (p=0.002 n=6)
    SliceDataIntoObjects/slice_262144-128/reader-16     182.0 ± 0%    188.0 ± 1%   +3.30% (p=0.002 n=6)
    SliceDataIntoObjects/slice_262144-128/writer-16    227.8k ± 0%   197.1k ± 0%  -13.48% (p=0.002 n=6)
    SliceDataIntoObjects/slice_1048576-128/reader-16    279.0 ± 3%    230.5 ± 6%  -17.38% (p=0.002 n=6)
    SliceDataIntoObjects/slice_1048576-128/writer-16   934.5k ± 0%   762.4k ± 0%  -18.42% (p=0.002 n=6)
    geomean                                             720.3         690.1        -4.19%
    
    Signed-off-by: Evgenii Baidakov <[email protected]>
    smallhive committed Jul 28, 2023
    Configuration menu
    Copy the full SHA
    d6858d9 View commit details
    Browse the repository at this point in the history