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

feat: refactor subtask 2 #626

Merged
merged 4 commits into from
Nov 25, 2022
Merged

Conversation

cool-develope
Copy link
Collaborator

No description provided.

@cool-develope cool-develope requested a review from a team as a code owner November 23, 2022 18:02
@@ -6,29 +6,29 @@ import (
ibytes "github.com/cosmos/iavl/internal/bytes"
)

// Node[T] represents a node eligible for caching.
type Node[T any] interface {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the reason for this revert?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously, the global nonce is used as a nodekey, so we didn't need to convert. But now we are using version + nonce, I think we don't need template type here.

@cool-develope
Copy link
Collaborator Author

benchmark result compare new version (version | local nonce) with global nonce

name                                                                             old time/op    new time/op    delta
Large/memdb-1000000-100-16-40/query-no-in-tree-guarantee-fast-8                    5.14µs ±19%    5.18µs ±18%      ~     (p=0.994 n=20+18)
Large/memdb-1000000-100-16-40/query-no-in-tree-guarantee-slow-8                    24.6µs ±32%    22.3µs ±12%    -9.17%  (p=0.048 n=20+18)
Large/memdb-1000000-100-16-40/query-hits-fast-8                                    6.41µs ±14%    7.23µs ±16%   +12.76%  (p=0.000 n=19+20)
Large/memdb-1000000-100-16-40/query-hits-slow-8                                    32.1µs ±18%    28.5µs ±15%   -11.22%  (p=0.000 n=19+20)
Large/memdb-1000000-100-16-40/iteration-fast-8                                      787ms ±19%     733ms ±22%      ~     (p=0.054 n=20+19)
Large/memdb-1000000-100-16-40/iteration-slow-8                                      14.7s ±13%      7.2s ±14%   -50.59%  (p=0.000 n=20+20)
Large/memdb-1000000-100-16-40/update-8                                              266µs ±17%     282µs ±14%    +5.89%  (p=0.042 n=19+18)
Large/memdb-1000000-100-16-40/block-8                                              31.0ms ±10%    31.7ms ±10%      ~     (p=0.258 n=19+18)
Large/goleveldb-1000000-100-16-40/query-no-in-tree-guarantee-fast-8                11.1µs ±11%    11.4µs ±29%      ~     (p=0.989 n=20+19)
Large/goleveldb-1000000-100-16-40/query-no-in-tree-guarantee-slow-8                36.3µs ±34%    35.6µs ±27%      ~     (p=0.799 n=20+20)
Large/goleveldb-1000000-100-16-40/query-hits-fast-8                                12.9µs ±20%    13.7µs ±17%    +6.73%  (p=0.037 n=19+19)
Large/goleveldb-1000000-100-16-40/query-hits-slow-8                                43.6µs ± 9%    46.9µs ±21%      ~     (p=0.072 n=18+20)
Large/goleveldb-1000000-100-16-40/iteration-fast-8                                  848ms ±17%     989ms ±27%   +16.63%  (p=0.000 n=18+20)
Large/goleveldb-1000000-100-16-40/iteration-slow-8                                  24.5s ± 6%     15.3s ±13%   -37.51%  (p=0.000 n=19+19)
Large/goleveldb-1000000-100-16-40/update-8                                          263µs ±21%     324µs ±17%   +23.35%  (p=0.000 n=19+19)
Large/goleveldb-1000000-100-16-40/block-8                                          37.2ms ±30%    38.9ms ±22%      ~     (p=0.204 n=20+19)
LevelDBLargeData/goleveldb-50000-100-32-100/query-no-in-tree-guarantee-fast-8      9.68µs ±80%    6.27µs ±39%   -35.24%  (p=0.000 n=40+39)
LevelDBLargeData/goleveldb-50000-100-32-100/query-no-in-tree-guarantee-slow-8      22.0µs ±44%    20.4µs ±30%    -7.43%  (p=0.048 n=36+37)
LevelDBLargeData/goleveldb-50000-100-32-100/query-hits-fast-8                       696ns ±33%     769ns ±25%   +10.57%  (p=0.000 n=39+40)
LevelDBLargeData/goleveldb-50000-100-32-100/query-hits-slow-8                      27.2µs ±14%    29.9µs ±36%    +9.79%  (p=0.000 n=37+38)
LevelDBLargeData/goleveldb-50000-100-32-100/iteration-fast-8                       70.1ms ±30%    66.1ms ±24%      ~     (p=0.051 n=39+40)
LevelDBLargeData/goleveldb-50000-100-32-100/iteration-slow-8                        1.06s ±19%     0.88s ±29%   -16.66%  (p=0.000 n=37+40)
LevelDBLargeData/goleveldb-50000-100-32-100/update-8                                207µs ±25%     278µs ±38%   +34.39%  (p=0.000 n=40+40)
LevelDBLargeData/goleveldb-50000-100-32-100/block-8                                29.2ms ±39%    32.2ms ±27%   +10.02%  (p=0.001 n=37+39)
LevelDBLargeData/goleveldb-50000-100-32-1000/query-no-in-tree-guarantee-fast-8     10.6µs ±16%    12.1µs ±23%   +14.52%  (p=0.000 n=40+40)
LevelDBLargeData/goleveldb-50000-100-32-1000/query-no-in-tree-guarantee-slow-8     24.7µs ±16%    27.1µs ±28%    +9.83%  (p=0.001 n=36+40)
LevelDBLargeData/goleveldb-50000-100-32-1000/query-hits-fast-8                      670ns ±19%     763ns ±27%   +13.89%  (p=0.000 n=37+40)
LevelDBLargeData/goleveldb-50000-100-32-1000/query-hits-slow-8                     34.6µs ±25%    38.7µs ±39%   +11.72%  (p=0.002 n=40+40)
LevelDBLargeData/goleveldb-50000-100-32-1000/iteration-fast-8                       191ms ±22%     204ms ±28%    +6.76%  (p=0.024 n=36+39)
LevelDBLargeData/goleveldb-50000-100-32-1000/iteration-slow-8                       1.27s ±19%     1.09s ±25%   -14.52%  (p=0.000 n=39+38)
LevelDBLargeData/goleveldb-50000-100-32-1000/update-8                               254µs ±21%     380µs ±37%   +49.47%  (p=0.000 n=36+40)
LevelDBLargeData/goleveldb-50000-100-32-1000/block-8                               38.8ms ±28%    45.3ms ±38%   +16.62%  (p=0.000 n=39+39)
LevelDBLargeData/goleveldb-50000-100-32-10000/query-no-in-tree-guarantee-fast-8    24.1µs ±36%    25.8µs ±22%    +7.13%  (p=0.006 n=39+40)
LevelDBLargeData/goleveldb-50000-100-32-10000/query-no-in-tree-guarantee-slow-8    56.1µs ±42%    55.6µs ±32%      ~     (p=0.749 n=40+40)
LevelDBLargeData/goleveldb-50000-100-32-10000/query-hits-fast-8                     728ns ±21%     779ns ±41%    +7.02%  (p=0.047 n=38+37)
LevelDBLargeData/goleveldb-50000-100-32-10000/query-hits-slow-8                    72.3µs ±25%    70.0µs ±25%      ~     (p=0.183 n=36+36)
LevelDBLargeData/goleveldb-50000-100-32-10000/iteration-fast-8                      888ms ±31%    1219ms ±63%   +37.28%  (p=0.002 n=36+40)
LevelDBLargeData/goleveldb-50000-100-32-10000/iteration-slow-8                      3.78s ±27%     3.34s ±23%   -11.57%  (p=0.000 n=35+40)
LevelDBLargeData/goleveldb-50000-100-32-10000/update-8                             2.06ms ±43%    2.17ms ±51%      ~     (p=0.323 n=36+39)
LevelDBLargeData/goleveldb-50000-100-32-10000/block-8                               260ms ±32%     252ms ±42%      ~     (p=0.301 n=36+33)
LevelDBBatchSizes/goleveldb-100000-5-16-40/query-no-in-tree-guarantee-fast-8       5.27µs ±18%    5.83µs ±16%   +10.72%  (p=0.000 n=20+19)
LevelDBBatchSizes/goleveldb-100000-5-16-40/query-no-in-tree-guarantee-slow-8       20.7µs ±13%    24.8µs ±27%   +19.61%  (p=0.000 n=18+20)
LevelDBBatchSizes/goleveldb-100000-5-16-40/query-hits-fast-8                        772ns ±12%     903ns ±20%   +17.00%  (p=0.000 n=20+20)
LevelDBBatchSizes/goleveldb-100000-5-16-40/query-hits-slow-8                       27.9µs ±30%    31.0µs ±19%   +10.91%  (p=0.005 n=19+19)
LevelDBBatchSizes/goleveldb-100000-5-16-40/iteration-fast-8                        97.4ms ±32%   100.4ms ±26%      ~     (p=0.258 n=18+19)
LevelDBBatchSizes/goleveldb-100000-5-16-40/iteration-slow-8                         1.98s ±29%     1.45s ±18%   -26.94%  (p=0.000 n=20+18)
LevelDBBatchSizes/goleveldb-100000-5-16-40/update-8                                 354µs ±13%     457µs ±26%   +29.07%  (p=0.000 n=19+19)
LevelDBBatchSizes/goleveldb-100000-5-16-40/block-8                                 2.17ms ±14%    2.54ms ±38%   +17.39%  (p=0.000 n=17+20)
LevelDBBatchSizes/goleveldb-100000-25-16-40/query-no-in-tree-guarantee-fast-8      5.55µs ±25%    5.42µs ±29%      ~     (p=0.529 n=20+20)
LevelDBBatchSizes/goleveldb-100000-25-16-40/query-no-in-tree-guarantee-slow-8      20.0µs ±14%    22.9µs ±20%   +14.54%  (p=0.000 n=19+20)
LevelDBBatchSizes/goleveldb-100000-25-16-40/query-hits-fast-8                       808ns ±18%    1052ns ±33%   +30.10%  (p=0.000 n=20+20)
LevelDBBatchSizes/goleveldb-100000-25-16-40/query-hits-slow-8                      29.1µs ±15%    30.9µs ±34%      ~     (p=0.330 n=17+19)
LevelDBBatchSizes/goleveldb-100000-25-16-40/iteration-fast-8                       98.1ms ±26%   104.8ms ±24%      ~     (p=0.091 n=20+20)
LevelDBBatchSizes/goleveldb-100000-25-16-40/iteration-slow-8                        1.84s ±10%     1.56s ±18%   -15.47%  (p=0.000 n=18+20)
LevelDBBatchSizes/goleveldb-100000-25-16-40/update-8                                245µs ±18%     300µs ±32%   +22.41%  (p=0.000 n=20+20)
LevelDBBatchSizes/goleveldb-100000-25-16-40/block-8                                8.20ms ±25%    9.49ms ±21%   +15.67%  (p=0.001 n=20+18)
LevelDBBatchSizes/goleveldb-100000-100-16-40/query-no-in-tree-guarantee-fast-8     5.06µs ±14%    5.82µs ±26%   +14.97%  (p=0.000 n=17+19)
LevelDBBatchSizes/goleveldb-100000-100-16-40/query-no-in-tree-guarantee-slow-8     21.4µs ±29%    21.6µs ±15%      ~     (p=0.478 n=20+20)
LevelDBBatchSizes/goleveldb-100000-100-16-40/query-hits-fast-8                      809ns ±18%     931ns ±31%   +15.15%  (p=0.001 n=20+20)
LevelDBBatchSizes/goleveldb-100000-100-16-40/query-hits-slow-8                     27.9µs ±21%    30.6µs ±24%    +9.72%  (p=0.026 n=17+20)
LevelDBBatchSizes/goleveldb-100000-100-16-40/iteration-fast-8                      95.8ms ±22%    93.3ms ±25%      ~     (p=0.341 n=20+20)
LevelDBBatchSizes/goleveldb-100000-100-16-40/iteration-slow-8                       1.86s ±16%     1.49s ±11%   -19.65%  (p=0.000 n=19+19)
LevelDBBatchSizes/goleveldb-100000-100-16-40/update-8                               199µs ±15%     272µs ±28%   +36.44%  (p=0.000 n=20+19)
LevelDBBatchSizes/goleveldb-100000-100-16-40/block-8                               29.7ms ±28%    32.5ms ±25%      ~     (p=0.121 n=20+20)
LevelDBBatchSizes/goleveldb-100000-400-16-40/query-no-in-tree-guarantee-fast-8     5.10µs ±13%    5.44µs ±19%    +6.83%  (p=0.017 n=20+19)
LevelDBBatchSizes/goleveldb-100000-400-16-40/query-no-in-tree-guarantee-slow-8     22.3µs ±29%    21.7µs ±26%      ~     (p=0.142 n=20+20)
LevelDBBatchSizes/goleveldb-100000-400-16-40/query-hits-fast-8                      820ns ±29%     880ns ±28%      ~     (p=0.141 n=18+20)
LevelDBBatchSizes/goleveldb-100000-400-16-40/query-hits-slow-8                     28.3µs ±15%    28.1µs ±20%      ~     (p=0.773 n=19+19)
LevelDBBatchSizes/goleveldb-100000-400-16-40/iteration-fast-8                      87.6ms ±22%    92.1ms ±19%      ~     (p=0.158 n=19+20)
LevelDBBatchSizes/goleveldb-100000-400-16-40/iteration-slow-8                       2.10s ±16%     1.46s ±14%   -30.48%  (p=0.000 n=18+19)
LevelDBBatchSizes/goleveldb-100000-400-16-40/update-8                               198µs ±17%     286µs ±26%   +44.48%  (p=0.000 n=18+19)
LevelDBBatchSizes/goleveldb-100000-400-16-40/block-8                                111ms ±19%     133ms ±25%   +19.58%  (p=0.000 n=18+20)
LevelDBBatchSizes/goleveldb-100000-2000-16-40/query-no-in-tree-guarantee-fast-8    5.65µs ±20%    5.50µs ±32%      ~     (p=0.327 n=20+20)
LevelDBBatchSizes/goleveldb-100000-2000-16-40/query-no-in-tree-guarantee-slow-8    20.3µs ±11%    25.8µs ±23%   +26.65%  (p=0.000 n=19+20)
LevelDBBatchSizes/goleveldb-100000-2000-16-40/query-hits-fast-8                     924ns ±27%     888ns ±24%      ~     (p=0.355 n=20+20)
LevelDBBatchSizes/goleveldb-100000-2000-16-40/query-hits-slow-8                    30.2µs ±26%    29.7µs ±30%      ~     (p=0.531 n=19+20)
LevelDBBatchSizes/goleveldb-100000-2000-16-40/iteration-fast-8                     87.9ms ±13%    82.2ms ±10%    -6.52%  (p=0.005 n=17+17)
LevelDBBatchSizes/goleveldb-100000-2000-16-40/iteration-slow-8                      1.95s ±11%     1.53s ±20%   -21.37%  (p=0.000 n=18+20)
LevelDBBatchSizes/goleveldb-100000-2000-16-40/update-8                              187µs ±13%     208µs ±43%      ~     (p=0.099 n=15+20)
LevelDBBatchSizes/goleveldb-100000-2000-16-40/block-8                               556ms ±27%     559ms ±17%      ~     (p=0.947 n=20+20)

name                                                                             old alloc/op   new alloc/op   delta
Large/memdb-1000000-100-16-40/query-no-in-tree-guarantee-fast-8                     88.0B ± 0%     88.0B ± 0%      ~     (all equal)
Large/memdb-1000000-100-16-40/query-no-in-tree-guarantee-slow-8                      720B ±48%      854B ± 6%   +18.56%  (p=0.000 n=18+16)
Large/memdb-1000000-100-16-40/query-hits-fast-8                                      210B ± 2%      210B ± 2%      ~     (p=0.681 n=18+18)
Large/memdb-1000000-100-16-40/query-hits-slow-8                                      943B ± 1%     1077B ± 1%   +14.23%  (p=0.000 n=20+20)
Large/memdb-1000000-100-16-40/iteration-fast-8                                      232MB ± 0%     232MB ± 0%    -0.00%  (p=0.000 n=19+16)
Large/memdb-1000000-100-16-40/iteration-slow-8                                     1.30GB ± 0%    1.10GB ± 0%   -15.95%  (p=0.000 n=18+16)
Large/memdb-1000000-100-16-40/update-8                                             36.8kB ± 1%    37.5kB ± 2%    +2.03%  (p=0.000 n=17+19)
Large/memdb-1000000-100-16-40/block-8                                              3.74MB ± 1%    3.76MB ± 0%    +0.30%  (p=0.002 n=19+20)
Large/goleveldb-1000000-100-16-40/query-no-in-tree-guarantee-fast-8                  993B ± 0%      993B ± 0%    -0.03%  (p=0.011 n=20+17)
Large/goleveldb-1000000-100-16-40/query-no-in-tree-guarantee-slow-8                2.22kB ±58%    2.44kB ±40%    +9.85%  (p=0.013 n=19+19)
Large/goleveldb-1000000-100-16-40/query-hits-fast-8                                1.03kB ± 1%    1.03kB ± 1%      ~     (p=0.386 n=18+19)
Large/goleveldb-1000000-100-16-40/query-hits-slow-8                                2.74kB ± 1%    3.01kB ± 1%    +9.98%  (p=0.000 n=20+19)
Large/goleveldb-1000000-100-16-40/iteration-fast-8                                  297MB ± 0%     297MB ± 0%    -0.00%  (p=0.000 n=19+15)
Large/goleveldb-1000000-100-16-40/iteration-slow-8                                 3.26GB ± 0%    2.53GB ± 0%   -22.45%  (p=0.000 n=17+18)
Large/goleveldb-1000000-100-16-40/update-8                                         49.5kB ± 7%    55.3kB ±11%   +11.72%  (p=0.000 n=19+20)
Large/goleveldb-1000000-100-16-40/block-8                                          5.66MB ± 5%    5.79MB ±15%      ~     (p=0.424 n=17+20)
LevelDBLargeData/goleveldb-50000-100-32-100/query-no-in-tree-guarantee-fast-8        976B ± 0%      936B ± 0%    -4.13%  (p=0.000 n=39+39)
LevelDBLargeData/goleveldb-50000-100-32-100/query-no-in-tree-guarantee-slow-8      1.73kB ± 1%    1.73kB ± 1%      ~     (p=0.077 n=40+37)
LevelDBLargeData/goleveldb-50000-100-32-100/query-hits-fast-8                       0.00B          0.00B           ~     (all equal)
LevelDBLargeData/goleveldb-50000-100-32-100/query-hits-slow-8                      2.45kB ± 1%    2.35kB ± 1%    -4.31%  (p=0.000 n=40+40)
LevelDBLargeData/goleveldb-50000-100-32-100/iteration-fast-8                       25.6MB ± 0%    25.1MB ± 0%    -1.80%  (p=0.000 n=40+39)
LevelDBLargeData/goleveldb-50000-100-32-100/iteration-slow-8                        163MB ± 0%     143MB ± 0%   -12.22%  (p=0.000 n=40+39)
LevelDBLargeData/goleveldb-50000-100-32-100/update-8                               36.3kB ± 3%    39.2kB ± 3%    +7.79%  (p=0.000 n=39+35)
LevelDBLargeData/goleveldb-50000-100-32-100/block-8                                4.90MB ±13%    4.64MB ±20%    -5.18%  (p=0.002 n=40+40)
LevelDBLargeData/goleveldb-50000-100-32-1000/query-no-in-tree-guarantee-fast-8     2.06kB ± 0%    2.07kB ± 0%    +0.08%  (p=0.000 n=40+40)
LevelDBLargeData/goleveldb-50000-100-32-1000/query-no-in-tree-guarantee-slow-8     2.73kB ± 1%    2.76kB ± 1%    +1.06%  (p=0.000 n=40+38)
LevelDBLargeData/goleveldb-50000-100-32-1000/query-hits-fast-8                      0.00B          0.00B           ~     (all equal)
LevelDBLargeData/goleveldb-50000-100-32-1000/query-hits-slow-8                     3.89kB ± 1%    3.82kB ± 1%    -1.87%  (p=0.000 n=40+38)
LevelDBLargeData/goleveldb-50000-100-32-1000/iteration-fast-8                       126MB ± 0%     126MB ± 0%    +0.12%  (p=0.000 n=40+40)
LevelDBLargeData/goleveldb-50000-100-32-1000/iteration-slow-8                       262MB ± 0%     242MB ± 0%    -7.86%  (p=0.000 n=38+38)
LevelDBLargeData/goleveldb-50000-100-32-1000/update-8                              55.4kB ± 9%    62.7kB ± 4%   +13.23%  (p=0.000 n=38+36)
LevelDBLargeData/goleveldb-50000-100-32-1000/block-8                               7.92MB ±12%    8.02MB ±12%      ~     (p=0.345 n=40+40)
LevelDBLargeData/goleveldb-50000-100-32-10000/query-no-in-tree-guarantee-fast-8    12.8kB ± 0%    12.8kB ± 0%    +0.14%  (p=0.001 n=36+40)
LevelDBLargeData/goleveldb-50000-100-32-10000/query-no-in-tree-guarantee-slow-8    13.0kB ± 2%    12.0kB ± 2%    -7.56%  (p=0.000 n=38+39)
LevelDBLargeData/goleveldb-50000-100-32-10000/query-hits-fast-8                     0.00B          0.00B           ~     (all equal)
LevelDBLargeData/goleveldb-50000-100-32-10000/query-hits-slow-8                    18.6kB ± 1%    17.1kB ± 1%    -7.80%  (p=0.000 n=40+40)
LevelDBLargeData/goleveldb-50000-100-32-10000/iteration-fast-8                     1.06GB ± 0%    1.06GB ± 0%    +0.00%  (p=0.009 n=40+40)
LevelDBLargeData/goleveldb-50000-100-32-10000/iteration-slow-8                     1.29GB ± 0%    1.17GB ± 0%    -9.92%  (p=0.000 n=38+38)
LevelDBLargeData/goleveldb-50000-100-32-10000/update-8                              186kB ± 7%     250kB ± 5%   +34.42%  (p=0.000 n=34+37)
LevelDBLargeData/goleveldb-50000-100-32-10000/block-8                              30.8MB ± 9%    35.0MB ±11%   +13.83%  (p=0.000 n=36+36)
LevelDBBatchSizes/goleveldb-100000-5-16-40/query-no-in-tree-guarantee-fast-8         790B ± 0%      790B ± 0%      ~     (all equal)
LevelDBBatchSizes/goleveldb-100000-5-16-40/query-no-in-tree-guarantee-slow-8       1.68kB ± 1%    1.77kB ± 1%    +5.23%  (p=0.000 n=19+20)
LevelDBBatchSizes/goleveldb-100000-5-16-40/query-hits-fast-8                        0.00B          0.00B           ~     (all equal)
LevelDBBatchSizes/goleveldb-100000-5-16-40/query-hits-slow-8                       2.41kB ± 1%    2.42kB ± 1%    +0.53%  (p=0.000 n=20+20)
LevelDBBatchSizes/goleveldb-100000-5-16-40/iteration-fast-8                        29.3MB ± 0%    29.3MB ± 0%      ~     (p=0.098 n=17+18)
LevelDBBatchSizes/goleveldb-100000-5-16-40/iteration-slow-8                         304MB ± 0%     253MB ± 0%   -16.64%  (p=0.000 n=18+17)
LevelDBBatchSizes/goleveldb-100000-5-16-40/update-8                                50.4kB ± 3%    52.6kB ± 3%    +4.49%  (p=0.000 n=18+19)
LevelDBBatchSizes/goleveldb-100000-5-16-40/block-8                                  292kB ± 7%     277kB ± 4%    -4.96%  (p=0.000 n=19+19)
LevelDBBatchSizes/goleveldb-100000-25-16-40/query-no-in-tree-guarantee-fast-8        790B ± 0%      790B ± 0%      ~     (all equal)
LevelDBBatchSizes/goleveldb-100000-25-16-40/query-no-in-tree-guarantee-slow-8      1.68kB ± 1%    1.77kB ± 1%    +5.60%  (p=0.000 n=20+20)
LevelDBBatchSizes/goleveldb-100000-25-16-40/query-hits-fast-8                       0.00B          0.00B           ~     (all equal)
LevelDBBatchSizes/goleveldb-100000-25-16-40/query-hits-slow-8                      2.40kB ± 0%    2.42kB ± 1%    +1.16%  (p=0.000 n=17+20)
LevelDBBatchSizes/goleveldb-100000-25-16-40/iteration-fast-8                       29.3MB ± 0%    29.3MB ± 0%    +0.00%  (p=0.009 n=19+17)
LevelDBBatchSizes/goleveldb-100000-25-16-40/iteration-slow-8                        303MB ± 0%     253MB ± 0%   -16.45%  (p=0.000 n=14+16)
LevelDBBatchSizes/goleveldb-100000-25-16-40/update-8                               43.3kB ± 2%    44.7kB ± 3%    +3.17%  (p=0.000 n=18+18)
LevelDBBatchSizes/goleveldb-100000-25-16-40/block-8                                1.33MB ±12%    1.26MB ± 8%    -5.57%  (p=0.003 n=20+19)
LevelDBBatchSizes/goleveldb-100000-100-16-40/query-no-in-tree-guarantee-fast-8       790B ± 0%      790B ± 0%      ~     (all equal)
LevelDBBatchSizes/goleveldb-100000-100-16-40/query-no-in-tree-guarantee-slow-8     1.68kB ± 1%    1.77kB ± 1%    +5.58%  (p=0.000 n=19+19)
LevelDBBatchSizes/goleveldb-100000-100-16-40/query-hits-fast-8                      0.00B          0.00B           ~     (all equal)
LevelDBBatchSizes/goleveldb-100000-100-16-40/query-hits-slow-8                     2.40kB ± 1%    2.42kB ± 1%    +0.88%  (p=0.000 n=20+20)
LevelDBBatchSizes/goleveldb-100000-100-16-40/iteration-fast-8                      29.3MB ± 0%    29.3MB ± 0%      ~     (p=0.096 n=19+20)
LevelDBBatchSizes/goleveldb-100000-100-16-40/iteration-slow-8                       304MB ± 0%     253MB ± 0%   -16.58%  (p=0.000 n=17+18)
LevelDBBatchSizes/goleveldb-100000-100-16-40/update-8                              37.9kB ± 3%    42.4kB ± 5%   +11.84%  (p=0.000 n=19+19)
LevelDBBatchSizes/goleveldb-100000-100-16-40/block-8                               4.69MB ± 8%    5.08MB ±11%    +8.42%  (p=0.000 n=20+20)
LevelDBBatchSizes/goleveldb-100000-400-16-40/query-no-in-tree-guarantee-fast-8       790B ± 0%      790B ± 0%      ~     (all equal)
LevelDBBatchSizes/goleveldb-100000-400-16-40/query-no-in-tree-guarantee-slow-8     1.68kB ± 1%    1.77kB ± 1%    +5.28%  (p=0.000 n=20+20)
LevelDBBatchSizes/goleveldb-100000-400-16-40/query-hits-fast-8                      0.00B          0.00B           ~     (all equal)
LevelDBBatchSizes/goleveldb-100000-400-16-40/query-hits-slow-8                     2.40kB ± 1%    2.42kB ± 1%    +0.43%  (p=0.001 n=20+20)
LevelDBBatchSizes/goleveldb-100000-400-16-40/iteration-fast-8                      29.3MB ± 0%    29.3MB ± 0%      ~     (p=0.052 n=20+18)
LevelDBBatchSizes/goleveldb-100000-400-16-40/iteration-slow-8                       304MB ± 0%     254MB ± 0%   -16.52%  (p=0.000 n=18+19)
LevelDBBatchSizes/goleveldb-100000-400-16-40/update-8                              38.7kB ± 7%    42.9kB ± 9%   +11.06%  (p=0.000 n=19+19)
LevelDBBatchSizes/goleveldb-100000-400-16-40/block-8                               18.7MB ± 7%    19.4MB ± 7%    +3.79%  (p=0.017 n=20+20)
LevelDBBatchSizes/goleveldb-100000-2000-16-40/query-no-in-tree-guarantee-fast-8      790B ± 0%      790B ± 0%      ~     (all equal)
LevelDBBatchSizes/goleveldb-100000-2000-16-40/query-no-in-tree-guarantee-slow-8    1.67kB ± 1%    1.77kB ± 1%    +5.76%  (p=0.000 n=20+20)
LevelDBBatchSizes/goleveldb-100000-2000-16-40/query-hits-fast-8                     0.00B          0.00B           ~     (all equal)
LevelDBBatchSizes/goleveldb-100000-2000-16-40/query-hits-slow-8                    2.40kB ± 1%    2.42kB ± 1%    +0.83%  (p=0.000 n=19+20)
LevelDBBatchSizes/goleveldb-100000-2000-16-40/iteration-fast-8                     29.3MB ± 0%    29.3MB ± 0%      ~     (p=0.456 n=19+20)
LevelDBBatchSizes/goleveldb-100000-2000-16-40/iteration-slow-8                      303MB ± 0%     253MB ± 0%   -16.49%  (p=0.000 n=19+19)
LevelDBBatchSizes/goleveldb-100000-2000-16-40/update-8                             36.4kB ±24%    39.8kB ±28%    +9.25%  (p=0.005 n=18+20)
LevelDBBatchSizes/goleveldb-100000-2000-16-40/block-8                              95.0MB ±11%    96.4MB ±10%      ~     (p=0.758 n=20+20)

name                                                                             old allocs/op  new allocs/op  delta
Large/memdb-1000000-100-16-40/query-no-in-tree-guarantee-fast-8                      3.00 ± 0%      3.00 ± 0%      ~     (all equal)
Large/memdb-1000000-100-16-40/query-no-in-tree-guarantee-slow-8                      12.2 ±48%      36.2 ± 5%  +197.43%  (p=0.000 n=18+16)
Large/memdb-1000000-100-16-40/query-hits-fast-8                                      4.00 ± 0%      4.00 ± 0%      ~     (all equal)
Large/memdb-1000000-100-16-40/query-hits-slow-8                                      16.0 ± 0%      43.0 ± 0%  +168.75%  (p=0.000 n=20+20)
Large/memdb-1000000-100-16-40/iteration-fast-8                                      4.00M ± 0%     4.00M ± 0%    -0.00%  (p=0.000 n=19+17)
Large/memdb-1000000-100-16-40/iteration-slow-8                                      22.0M ± 0%     33.0M ± 0%   +50.00%  (p=0.000 n=18+18)
Large/memdb-1000000-100-16-40/update-8                                                585 ± 2%       781 ± 2%   +33.53%  (p=0.000 n=19+19)
Large/memdb-1000000-100-16-40/block-8                                               59.7k ± 1%     78.0k ± 0%   +30.69%  (p=0.000 n=19+20)
Large/goleveldb-1000000-100-16-40/query-no-in-tree-guarantee-fast-8                  19.0 ± 0%      19.0 ± 0%      ~     (all equal)
Large/goleveldb-1000000-100-16-40/query-no-in-tree-guarantee-slow-8                  33.4 ±59%      56.0 ±38%   +67.56%  (p=0.000 n=19+19)
Large/goleveldb-1000000-100-16-40/query-hits-fast-8                                  19.0 ± 0%      19.0 ± 0%      ~     (all equal)
Large/goleveldb-1000000-100-16-40/query-hits-slow-8                                  40.8 ± 2%      64.4 ± 1%   +57.91%  (p=0.000 n=20+20)
Large/goleveldb-1000000-100-16-40/iteration-fast-8                                  5.31M ± 0%     5.31M ± 0%    +0.00%  (p=0.043 n=18+20)
Large/goleveldb-1000000-100-16-40/iteration-slow-8                                  51.0M ± 0%     57.2M ± 0%   +12.16%  (p=0.000 n=18+18)
Large/goleveldb-1000000-100-16-40/update-8                                            604 ± 2%       915 ± 7%   +51.54%  (p=0.000 n=19+19)
Large/goleveldb-1000000-100-16-40/block-8                                           70.7k ± 3%     92.5k ± 7%   +30.88%  (p=0.000 n=20+20)
LevelDBLargeData/goleveldb-50000-100-32-100/query-no-in-tree-guarantee-fast-8        16.0 ± 0%      15.0 ± 0%    -6.25%  (p=0.000 n=40+40)
LevelDBLargeData/goleveldb-50000-100-32-100/query-no-in-tree-guarantee-slow-8        27.0 ± 0%      46.0 ± 0%   +70.37%  (p=0.000 n=38+33)
LevelDBLargeData/goleveldb-50000-100-32-100/query-hits-fast-8                        0.00           0.00           ~     (all equal)
LevelDBLargeData/goleveldb-50000-100-32-100/query-hits-slow-8                        39.0 ± 0%      58.0 ± 0%   +48.72%  (p=0.000 n=39+36)
LevelDBLargeData/goleveldb-50000-100-32-100/iteration-fast-8                         283k ± 0%      274k ± 0%    -3.06%  (p=0.000 n=40+40)
LevelDBLargeData/goleveldb-50000-100-32-100/iteration-slow-8                        2.52M ± 0%     2.91M ± 0%   +15.46%  (p=0.000 n=40+37)
LevelDBLargeData/goleveldb-50000-100-32-100/update-8                                  467 ± 3%       656 ± 3%   +40.64%  (p=0.000 n=38+37)
LevelDBLargeData/goleveldb-50000-100-32-100/block-8                                 62.0k ±13%     75.6k ±11%   +21.95%  (p=0.000 n=40+40)
LevelDBLargeData/goleveldb-50000-100-32-1000/query-no-in-tree-guarantee-fast-8       19.0 ± 0%      19.0 ± 0%      ~     (all equal)
LevelDBLargeData/goleveldb-50000-100-32-1000/query-no-in-tree-guarantee-slow-8       28.5 ± 2%      47.5 ± 1%   +66.35%  (p=0.000 n=40+40)
LevelDBLargeData/goleveldb-50000-100-32-1000/query-hits-fast-8                       0.00           0.00           ~     (all equal)
LevelDBLargeData/goleveldb-50000-100-32-1000/query-hits-slow-8                       41.0 ± 0%      61.0 ± 0%   +48.78%  (p=0.000 n=34+36)
LevelDBLargeData/goleveldb-50000-100-32-1000/iteration-fast-8                        438k ± 0%      438k ± 0%    -0.00%  (p=0.000 n=40+40)
LevelDBLargeData/goleveldb-50000-100-32-1000/iteration-slow-8                       2.60M ± 0%     2.96M ± 0%   +14.07%  (p=0.000 n=38+38)
LevelDBLargeData/goleveldb-50000-100-32-1000/update-8                                 547 ±10%       796 ± 5%   +45.51%  (p=0.000 n=36+38)
LevelDBLargeData/goleveldb-50000-100-32-1000/block-8                                75.2k ±11%     89.3k ± 9%   +18.77%  (p=0.000 n=40+40)
LevelDBLargeData/goleveldb-50000-100-32-10000/query-no-in-tree-guarantee-fast-8      21.0 ± 0%      21.0 ± 0%      ~     (all equal)
LevelDBLargeData/goleveldb-50000-100-32-10000/query-no-in-tree-guarantee-slow-8      30.0 ± 0%      49.0 ± 0%   +63.33%  (p=0.000 n=37+31)
LevelDBLargeData/goleveldb-50000-100-32-10000/query-hits-fast-8                      0.00           0.00           ~     (all equal)
LevelDBLargeData/goleveldb-50000-100-32-10000/query-hits-slow-8                      43.0 ± 0%      63.0 ± 0%   +46.51%  (p=0.000 n=31+33)
LevelDBLargeData/goleveldb-50000-100-32-10000/iteration-fast-8                       704k ± 0%      704k ± 0%      ~     (p=0.082 n=40+40)
LevelDBLargeData/goleveldb-50000-100-32-10000/iteration-slow-8                      2.79M ± 0%     3.15M ± 0%   +12.90%  (p=0.000 n=38+38)
LevelDBLargeData/goleveldb-50000-100-32-10000/update-8                                630 ±18%      1112 ± 4%   +76.43%  (p=0.000 n=32+34)
LevelDBLargeData/goleveldb-50000-100-32-10000/block-8                               94.3k ±12%    124.5k ± 8%   +32.05%  (p=0.000 n=36+33)
LevelDBBatchSizes/goleveldb-100000-5-16-40/query-no-in-tree-guarantee-fast-8         15.0 ± 0%      15.0 ± 0%      ~     (all equal)
LevelDBBatchSizes/goleveldb-100000-5-16-40/query-no-in-tree-guarantee-slow-8         26.4 ± 2%      46.5 ± 1%   +76.66%  (p=0.000 n=20+20)
LevelDBBatchSizes/goleveldb-100000-5-16-40/query-hits-fast-8                         0.00           0.00           ~     (all equal)
LevelDBBatchSizes/goleveldb-100000-5-16-40/query-hits-slow-8                         37.7 ± 2%      59.0 ± 0%   +56.50%  (p=0.000 n=20+20)
LevelDBBatchSizes/goleveldb-100000-5-16-40/iteration-fast-8                          523k ± 0%      523k ± 0%      ~     (p=0.714 n=17+20)
LevelDBBatchSizes/goleveldb-100000-5-16-40/iteration-slow-8                         4.89M ± 0%     5.72M ± 0%   +17.02%  (p=0.000 n=17+18)
LevelDBBatchSizes/goleveldb-100000-5-16-40/update-8                                   678 ± 1%       862 ± 3%   +26.98%  (p=0.000 n=18+20)
LevelDBBatchSizes/goleveldb-100000-5-16-40/block-8                                  3.77k ± 5%     4.45k ± 3%   +18.01%  (p=0.000 n=20+20)
LevelDBBatchSizes/goleveldb-100000-25-16-40/query-no-in-tree-guarantee-fast-8        15.0 ± 0%      15.0 ± 0%      ~     (all equal)
LevelDBBatchSizes/goleveldb-100000-25-16-40/query-no-in-tree-guarantee-slow-8        26.4 ± 2%      46.4 ± 1%   +75.24%  (p=0.000 n=20+20)
LevelDBBatchSizes/goleveldb-100000-25-16-40/query-hits-fast-8                        0.00           0.00           ~     (all equal)
LevelDBBatchSizes/goleveldb-100000-25-16-40/query-hits-slow-8                        37.8 ± 2%      59.0 ± 0%   +56.29%  (p=0.000 n=20+20)
LevelDBBatchSizes/goleveldb-100000-25-16-40/iteration-fast-8                         523k ± 0%      523k ± 0%    +0.00%  (p=0.000 n=20+19)
LevelDBBatchSizes/goleveldb-100000-25-16-40/iteration-slow-8                        4.89M ± 0%     5.72M ± 0%   +17.02%  (p=0.000 n=18+18)
LevelDBBatchSizes/goleveldb-100000-25-16-40/update-8                                  556 ± 1%       730 ± 2%   +31.38%  (p=0.000 n=19+18)
LevelDBBatchSizes/goleveldb-100000-25-16-40/block-8                                 16.7k ± 9%     19.9k ± 7%   +19.31%  (p=0.000 n=20+20)
LevelDBBatchSizes/goleveldb-100000-100-16-40/query-no-in-tree-guarantee-fast-8       15.0 ± 0%      15.0 ± 0%      ~     (all equal)
LevelDBBatchSizes/goleveldb-100000-100-16-40/query-no-in-tree-guarantee-slow-8       26.2 ± 3%      46.5 ± 1%   +76.95%  (p=0.000 n=20+20)
LevelDBBatchSizes/goleveldb-100000-100-16-40/query-hits-fast-8                       0.00           0.00           ~     (all equal)
LevelDBBatchSizes/goleveldb-100000-100-16-40/query-hits-slow-8                       37.7 ± 2%      59.0 ± 0%   +56.71%  (p=0.000 n=20+20)
LevelDBBatchSizes/goleveldb-100000-100-16-40/iteration-fast-8                        523k ± 0%      523k ± 0%    -0.00%  (p=0.000 n=16+20)
LevelDBBatchSizes/goleveldb-100000-100-16-40/iteration-slow-8                       4.89M ± 0%     5.72M ± 0%   +17.01%  (p=0.000 n=18+18)
LevelDBBatchSizes/goleveldb-100000-100-16-40/update-8                                 488 ± 2%       680 ± 3%   +39.20%  (p=0.000 n=18+19)
LevelDBBatchSizes/goleveldb-100000-100-16-40/block-8                                60.3k ± 7%     76.0k ± 7%   +25.96%  (p=0.000 n=20+20)
LevelDBBatchSizes/goleveldb-100000-400-16-40/query-no-in-tree-guarantee-fast-8       15.0 ± 0%      15.0 ± 0%      ~     (all equal)
LevelDBBatchSizes/goleveldb-100000-400-16-40/query-no-in-tree-guarantee-slow-8       26.3 ± 3%      46.4 ± 1%   +76.62%  (p=0.000 n=20+20)
LevelDBBatchSizes/goleveldb-100000-400-16-40/query-hits-fast-8                       0.00           0.00           ~     (all equal)
LevelDBBatchSizes/goleveldb-100000-400-16-40/query-hits-slow-8                       37.6 ± 2%      59.0 ± 0%   +56.91%  (p=0.000 n=20+20)
LevelDBBatchSizes/goleveldb-100000-400-16-40/iteration-fast-8                        523k ± 0%      523k ± 0%      ~     (p=0.101 n=20+20)
LevelDBBatchSizes/goleveldb-100000-400-16-40/iteration-slow-8                       4.89M ± 0%     5.72M ± 0%   +17.03%  (p=0.000 n=18+18)
LevelDBBatchSizes/goleveldb-100000-400-16-40/update-8                                 470 ± 6%       647 ±10%   +37.78%  (p=0.000 n=16+19)
LevelDBBatchSizes/goleveldb-100000-400-16-40/block-8                                 230k ± 8%      285k ± 6%   +23.94%  (p=0.000 n=20+20)
LevelDBBatchSizes/goleveldb-100000-2000-16-40/query-no-in-tree-guarantee-fast-8      15.0 ± 0%      15.0 ± 0%      ~     (all equal)
LevelDBBatchSizes/goleveldb-100000-2000-16-40/query-no-in-tree-guarantee-slow-8      26.3 ± 3%      46.5 ± 1%   +77.14%  (p=0.000 n=20+20)
LevelDBBatchSizes/goleveldb-100000-2000-16-40/query-hits-fast-8                      0.00           0.00           ~     (all equal)
LevelDBBatchSizes/goleveldb-100000-2000-16-40/query-hits-slow-8                      38.0 ± 0%      59.0 ± 0%   +55.26%  (p=0.000 n=16+20)
LevelDBBatchSizes/goleveldb-100000-2000-16-40/iteration-fast-8                       523k ± 0%      523k ± 0%      ~     (p=0.796 n=20+20)
LevelDBBatchSizes/goleveldb-100000-2000-16-40/iteration-slow-8                      4.89M ± 0%     5.72M ± 0%   +17.06%  (p=0.000 n=18+18)
LevelDBBatchSizes/goleveldb-100000-2000-16-40/update-8                                353 ±13%       486 ±28%   +37.73%  (p=0.000 n=17+20)
LevelDBBatchSizes/goleveldb-100000-2000-16-40/block-8                               1.06M ±15%     1.27M ±11%   +19.70%  (p=0.000 n=20+20)

@cool-develope cool-develope merged commit 43dcaff into 592/subtask-2 Nov 25, 2022
@cool-develope cool-develope deleted the 592/refactor-subtask-2 branch November 25, 2022 13:52
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