Skip to content

Tx pool reorg optimization#562

Closed
JekaMas wants to merge 31 commits into
developfrom
tx-pool-reorg-optimization
Closed

Tx pool reorg optimization#562
JekaMas wants to merge 31 commits into
developfrom
tx-pool-reorg-optimization

Conversation

@JekaMas

@JekaMas JekaMas commented Oct 20, 2022

Copy link
Copy Markdown
Contributor

It mostly keeps the same logic and just rearranges variables.

Was BenchmarkPoolMultiAccountBatchInsert-10 10000 168668 ns/op 19387 B/op 81 allocs/op
Now BenchmarkPoolMultiAccountBatchInsert-10 10000 100608 ns/op 2895 B/op 52 allocs/op

a bit better 'now':
BenchmarkPoolMultiAccountBatchInsert-10 12112 104955 ns/op 2678 B/op 47 allocs/op

name                                      old time/op    new time/op    delta
PoolBatchInsert100-10                       5.95ms ± 3%    5.97ms ± 0%     ~     (p=0.730 n=5+4)
PoolBatchInsert1000-10                      59.3ms ± 2%    59.0ms ± 0%     ~     (p=0.690 n=5+5)
PoolBatchInsert10000-10                      591ms ± 1%     594ms ± 0%     ~     (p=0.556 n=5+4)
PoolBatchLocalInsert100-10                  6.58ms ± 1%    6.53ms ± 2%     ~     (p=0.151 n=5+5)
PoolBatchLocalInsert1000-10                 68.8ms ± 6%    65.3ms ± 5%     ~     (p=0.056 n=5+5)
PoolBatchLocalInsert10000-10                 665ms ± 3%     639ms ± 4%     ~     (p=0.056 n=5+5)
PoolMultiAccountBatchInsert-10               169µs ±10%     108µs ±16%  -35.88%  (p=0.008 n=5+5)
PoolMultiAccountBatchInsertRace-10          2.94ms ± 9%    0.43ms ±16%  -85.48%  (p=0.008 n=5+5)
PoolMultiAccountBatchInsertNoLockRace-10     10.0s ± 0%     10.0s ± 0%     ~     (p=0.310 n=5+5)


name                                      old allocs/op  new allocs/op  delta
PoolBatchInsert100-10                        5.17k ± 0%     2.99k ± 0%  -42.15%  (p=0.008 n=5+5)
PoolBatchInsert1000-10                       51.7k ± 0%     29.8k ± 0%  -42.31%  (p=0.008 n=5+5)
PoolBatchInsert10000-10                       474k ± 0%      260k ± 0%  -45.17%  (p=0.008 n=5+5)
PoolBatchLocalInsert100-10                   5.95k ± 0%     3.24k ± 0%  -45.44%  (p=0.008 n=5+5)
PoolBatchLocalInsert1000-10                  58.8k ± 0%     31.8k ± 0%  -45.92%  (p=0.008 n=5+5)
PoolBatchLocalInsert10000-10                  587k ± 0%      317k ± 0%  -45.97%  (p=0.008 n=5+5)
PoolMultiAccountBatchInsert-10                79.0 ± 0%      51.0 ± 0%  -35.44%  (p=0.000 n=5+4)
PoolMultiAccountBatchInsertRace-10           14.8k ±10%      2.3k ± 1%  -84.47%  (p=0.008 n=5+5)
PoolMultiAccountBatchInsertNoLockRace-10       148 ±20%       113 ± 8%  -23.56%  (p=0.029 n=4+4)

old.txt

@codecov-commenter

codecov-commenter commented Oct 20, 2022

Copy link
Copy Markdown

Codecov Report

Base: 56.83% // Head: 56.91% // Increases project coverage by +0.07% 🎉

Coverage data is based on head (758eb4f) compared to base (c954606).
Patch coverage: 75.59% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #562      +/-   ##
===========================================
+ Coverage    56.83%   56.91%   +0.07%     
===========================================
  Files          606      607       +1     
  Lines        70128    70659     +531     
===========================================
+ Hits         39859    40215     +356     
- Misses       26855    26998     +143     
- Partials      3414     3446      +32     
Impacted Files Coverage Δ
common/math/uint.go 0.00% <0.00%> (ø)
eth/api_backend.go 0.00% <0.00%> (ø)
core/types/access_list_tx.go 64.91% <19.04%> (-22.90%) ⬇️
common/math/big.go 71.76% <33.33%> (-5.46%) ⬇️
core/types/legacy_tx.go 67.18% <33.33%> (-16.15%) ⬇️
core/types/dynamic_fee_tx.go 75.40% <40.00%> (-22.16%) ⬇️
miner/worker.go 72.62% <50.00%> (-0.32%) ⬇️
core/types/transaction.go 58.02% <51.42%> (-3.93%) ⬇️
core/tx_pool.go 77.07% <86.55%> (+6.65%) ⬆️
consensus/misc/eip1559.go 89.39% <92.59%> (+2.21%) ⬆️
... and 35 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Comment thread core/tx_pool.go

@b00ris b00ris left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Generally ok. I added some comments about additional calls that you can remove

Comment thread core/tx_pool.go
Comment thread core/tx_pool.go Outdated
Comment thread core/tx_pool.go
@JekaMas

JekaMas commented Oct 22, 2022

Copy link
Copy Markdown
Contributor Author

Latest update:

benchstat new.txt old.txt
 
name                                      old time/op    new time/op    delta
PoolBatchInsert100-10                       5.82ms ± 1%    6.09ms ± 0%    +4.76%  (p=0.008 n=5+5)
PoolBatchInsert1000-10                      57.8ms ± 2%    60.7ms ± 0%    +4.88%  (p=0.008 n=5+5)
PoolBatchInsert10000-10                      589ms ± 2%     598ms ± 0%      ~     (p=0.690 n=5+5)
PoolBatchLocalInsert100-10                  6.57ms ± 2%    6.66ms ± 1%      ~     (p=0.056 n=5+5)
PoolBatchLocalInsert1000-10                 65.2ms ± 1%    66.4ms ± 0%    +1.84%  (p=0.008 n=5+5)
PoolBatchLocalInsert10000-10                 638ms ± 1%     662ms ± 2%    +3.80%  (p=0.008 n=5+5)
PoolMultiAccountBatchInsert-10               114µs ± 2%     158µs ± 1%   +39.24%  (p=0.008 n=5+5)
PoolMultiAccountBatchInsertRace-10           487µs ± 3%    3040µs ±10%  +523.56%  (p=0.008 n=5+5)
PoolMultiAccountBatchInsertNoLockRace-10     277µs ± 1%     810µs ± 7%  +192.13%  (p=0.008 n=5+5)

name                                      old alloc/op   new alloc/op   delta
PoolBatchInsert100-10                        154kB ± 0%     204kB ± 0%   +33.00%  (p=0.008 n=5+5)
PoolBatchInsert1000-10                      1.57MB ± 0%    2.08MB ± 0%   +32.93%  (p=0.008 n=5+5)
PoolBatchInsert10000-10                     14.8MB ± 0%    19.0MB ± 0%   +27.94%  (p=0.008 n=5+5)
PoolBatchLocalInsert100-10                  4.16MB ± 3%    4.04MB ± 2%      ~     (p=0.095 n=5+5)
PoolBatchLocalInsert1000-10                 40.3MB ± 5%    39.5MB ± 0%      ~     (p=0.690 n=5+5)
PoolBatchLocalInsert10000-10                 425MB ± 0%     431MB ± 0%    +1.44%  (p=0.008 n=5+5)
PoolMultiAccountBatchInsert-10              2.91kB ± 0%   19.36kB ± 0%  +565.09%  (p=0.016 n=5+4)
PoolMultiAccountBatchInsertRace-10           430kB ± 0%    3217kB ± 7%  +647.51%  (p=0.008 n=5+5)
PoolMultiAccountBatchInsertNoLockRace-10     253kB ± 1%     863kB ± 6%  +241.74%  (p=0.008 n=5+5)

name                                      old allocs/op  new allocs/op  delta
PoolBatchInsert100-10                        2.98k ± 0%     5.17k ± 0%   +73.40%  (p=0.008 n=5+5)
PoolBatchInsert1000-10                       29.8k ± 0%     51.8k ± 0%   +73.66%  (p=0.008 n=5+5)
PoolBatchInsert10000-10                       266k ± 0%      474k ± 0%   +77.98%  (p=0.008 n=5+5)
PoolBatchLocalInsert100-10                   3.24k ± 0%     5.95k ± 0%   +83.45%  (p=0.008 n=5+5)
PoolBatchLocalInsert1000-10                  31.8k ± 0%     58.8k ± 0%   +84.93%  (p=0.008 n=5+5)
PoolBatchLocalInsert10000-10                  317k ± 0%      587k ± 0%   +85.10%  (p=0.008 n=5+5)
PoolMultiAccountBatchInsert-10                50.0 ± 0%      79.0 ± 0%   +58.00%  (p=0.008 n=5+5)
PoolMultiAccountBatchInsertRace-10           2.46k ± 1%    16.65k ± 9%  +577.10%  (p=0.008 n=5+5)
PoolMultiAccountBatchInsertNoLockRace-10     1.32k ± 1%     4.43k ± 6%  +234.80%  (p=0.008 n=5+5)

new.txt
old.txt

@JekaMas

JekaMas commented Oct 23, 2022

Copy link
Copy Markdown
Contributor Author
benchstat new_locals_err.txt new_locals.txt 
name                                      old time/op    new time/op    delta
PoolBatchInsert100-10                       5.81ms ± 2%    6.01ms ± 1%     +3.45%  (p=0.008 n=5+5)
PoolBatchInsert1000-10                      58.1ms ± 3%    60.0ms ± 1%       ~     (p=0.056 n=5+5)
PoolBatchInsert10000-10                      627ms ±15%     594ms ± 0%       ~     (p=0.151 n=5+5)
PoolBatchLocalInsert100-10                  6.52ms ± 2%    6.51ms ± 0%       ~     (p=0.841 n=5+5)
PoolBatchLocalInsert1000-10                 64.4ms ± 2%    65.3ms ± 1%       ~     (p=0.151 n=5+5)
PoolBatchLocalInsert10000-10                 637ms ± 3%     639ms ± 0%       ~     (p=0.190 n=5+4)
PoolAccountMultiBatchInsert-10               114µs ± 1%     114µs ± 1%       ~     (p=0.222 n=5+5)
PoolAccountMultiBatchInsertRace-10           433µs ± 5%     545µs ± 7%    +25.81%  (p=0.008 n=5+5)
PoolAccountMultiBatchInsertNoLockRace-10     245µs ± 9%     308µs ± 2%    +25.72%  (p=0.008 n=5+5)
PoolAccountsBatchInsert-10                   116µs ± 9%     115µs ± 1%       ~     (p=1.000 n=5+5)
PoolAccountsBatchInsertRace-10               433µs ±13%     496µs ± 2%    +14.72%  (p=0.016 n=5+5)
PoolAccountsBatchInsertNoLockRace-10         262µs ±10%     302µs ± 9%    +15.07%  (p=0.016 n=5+5)

name                                      old alloc/op   new alloc/op   delta
PoolBatchInsert100-10                        153kB ± 0%     158kB ± 0%     +2.69%  (p=0.008 n=5+5)
PoolBatchInsert1000-10                      1.56MB ± 0%    1.61MB ± 0%     +2.93%  (p=0.016 n=4+5)
PoolBatchInsert10000-10                     14.7MB ± 0%    14.5MB ± 0%     -0.82%  (p=0.008 n=5+5)
PoolBatchLocalInsert100-10                  4.16MB ± 2%    4.13MB ± 1%       ~     (p=0.841 n=5+5)
PoolBatchLocalInsert1000-10                 40.3MB ± 5%    38.9MB ± 0%       ~     (p=0.690 n=5+5)
PoolBatchLocalInsert10000-10                 425MB ± 0%     426MB ± 0%     +0.10%  (p=0.008 n=5+5)
PoolAccountMultiBatchInsert-10              2.90kB ± 0%    2.93kB ± 0%     +1.08%  (p=0.008 n=5+5)
PoolAccountMultiBatchInsertRace-10           424kB ± 2%     430kB ± 2%       ~     (p=0.095 n=5+5)
PoolAccountMultiBatchInsertNoLockRace-10     242kB ± 0%     255kB ± 0%     +5.65%  (p=0.008 n=5+5)
PoolAccountsBatchInsert-10                  2.88kB ± 0%    2.93kB ± 0%     +1.58%  (p=0.008 n=5+5)
PoolAccountsBatchInsertRace-10               414kB ± 6%     409kB ± 0%       ~     (p=0.690 n=5+5)
PoolAccountsBatchInsertNoLockRace-10         241kB ± 2%     255kB ± 0%     +5.96%  (p=0.016 n=5+4)

name                                      old allocs/op  new allocs/op  delta
PoolBatchInsert100-10                        2.98k ± 0%     2.99k ± 0%       ~     (p=0.063 n=5+5)
PoolBatchInsert1000-10                       29.8k ± 0%     29.9k ± 0%     +0.32%  (p=0.016 n=4+5)
PoolBatchInsert10000-10                       260k ± 0%      260k ± 0%       ~     (p=0.056 n=5+5)
PoolBatchLocalInsert100-10                   3.24k ± 0%     3.25k ± 0%     +0.10%  (p=0.016 n=5+4)
PoolBatchLocalInsert1000-10                  31.8k ± 0%     31.8k ± 0%       ~     (p=0.135 n=5+5)
PoolBatchLocalInsert10000-10                  317k ± 0%      317k ± 0%       ~     (p=0.389 n=5+5)
PoolAccountMultiBatchInsert-10                49.0 ± 0%      51.0 ± 0%     +4.08%  (p=0.008 n=5+5)
PoolAccountMultiBatchInsertRace-10             118 ± 1%      2459 ± 3%  +1980.20%  (p=0.008 n=5+5)
PoolAccountMultiBatchInsertNoLockRace-10      82.0 ± 0%    1338.6 ± 0%  +1532.44%  (p=0.008 n=5+5)
PoolAccountsBatchInsert-10                    47.0 ± 0%      51.0 ± 0%     +8.51%  (p=0.008 n=5+5)
PoolAccountsBatchInsertRace-10                 115 ± 3%      2318 ± 0%  +1912.33%  (p=0.008 n=5+5)
PoolAccountsBatchInsertNoLockRace-10          81.0 ± 0%    1339.2 ± 0%  +1553.40%  (p=0.029 n=4+4)
jekamas@MacBook-Pro-Evgeniy bor % benchstat new_locals.txt new_locals_err.txt 
name                                      old time/op    new time/op    delta
PoolBatchInsert100-10                       6.01ms ± 1%    5.81ms ± 2%   -3.33%  (p=0.008 n=5+5)
PoolBatchInsert1000-10                      60.0ms ± 1%    58.1ms ± 3%     ~     (p=0.056 n=5+5)
PoolBatchInsert10000-10                      594ms ± 0%     627ms ±15%     ~     (p=0.151 n=5+5)
PoolBatchLocalInsert100-10                  6.51ms ± 0%    6.52ms ± 2%     ~     (p=0.841 n=5+5)
PoolBatchLocalInsert1000-10                 65.3ms ± 1%    64.4ms ± 2%     ~     (p=0.151 n=5+5)
PoolBatchLocalInsert10000-10                 639ms ± 0%     637ms ± 3%     ~     (p=0.190 n=4+5)
PoolAccountMultiBatchInsert-10               114µs ± 1%     114µs ± 1%     ~     (p=0.222 n=5+5)
PoolAccountMultiBatchInsertRace-10           545µs ± 7%     433µs ± 5%  -20.52%  (p=0.008 n=5+5)
PoolAccountMultiBatchInsertNoLockRace-10     308µs ± 2%     245µs ± 9%  -20.46%  (p=0.008 n=5+5)
PoolAccountsBatchInsert-10                   115µs ± 1%     116µs ± 9%     ~     (p=1.000 n=5+5)
PoolAccountsBatchInsertRace-10               496µs ± 2%     433µs ±13%  -12.83%  (p=0.016 n=5+5)
PoolAccountsBatchInsertNoLockRace-10         302µs ± 9%     262µs ±10%  -13.10%  (p=0.016 n=5+5)

name                                      old alloc/op   new alloc/op   delta
PoolBatchInsert100-10                        158kB ± 0%     153kB ± 0%   -2.62%  (p=0.008 n=5+5)
PoolBatchInsert1000-10                      1.61MB ± 0%    1.56MB ± 0%   -2.85%  (p=0.016 n=5+4)
PoolBatchInsert10000-10                     14.5MB ± 0%    14.7MB ± 0%   +0.83%  (p=0.008 n=5+5)
PoolBatchLocalInsert100-10                  4.13MB ± 1%    4.16MB ± 2%     ~     (p=0.841 n=5+5)
PoolBatchLocalInsert1000-10                 38.9MB ± 0%    40.3MB ± 5%     ~     (p=0.690 n=5+5)
PoolBatchLocalInsert10000-10                 426MB ± 0%     425MB ± 0%   -0.10%  (p=0.008 n=5+5)
PoolAccountMultiBatchInsert-10              2.93kB ± 0%    2.90kB ± 0%   -1.07%  (p=0.008 n=5+5)
PoolAccountMultiBatchInsertRace-10           430kB ± 2%     424kB ± 2%     ~     (p=0.095 n=5+5)
PoolAccountMultiBatchInsertNoLockRace-10     255kB ± 0%     242kB ± 0%   -5.35%  (p=0.008 n=5+5)
PoolAccountsBatchInsert-10                  2.93kB ± 0%    2.88kB ± 0%   -1.56%  (p=0.008 n=5+5)
PoolAccountsBatchInsertRace-10               409kB ± 0%     414kB ± 6%     ~     (p=0.690 n=5+5)
PoolAccountsBatchInsertNoLockRace-10         255kB ± 0%     241kB ± 2%   -5.63%  (p=0.016 n=4+5)

name                                      old allocs/op  new allocs/op  delta
PoolBatchInsert100-10                        2.99k ± 0%     2.98k ± 0%     ~     (p=0.063 n=5+5)
PoolBatchInsert1000-10                       29.9k ± 0%     29.8k ± 0%   -0.32%  (p=0.016 n=5+4)
PoolBatchInsert10000-10                       260k ± 0%      260k ± 0%     ~     (p=0.056 n=5+5)
PoolBatchLocalInsert100-10                   3.25k ± 0%     3.24k ± 0%   -0.10%  (p=0.000 n=4+5)
PoolBatchLocalInsert1000-10                  31.8k ± 0%     31.8k ± 0%     ~     (p=0.135 n=5+5)
PoolBatchLocalInsert10000-10                  317k ± 0%      317k ± 0%     ~     (p=0.389 n=5+5)
PoolAccountMultiBatchInsert-10                51.0 ± 0%      49.0 ± 0%   -3.92%  (p=0.008 n=5+5)
PoolAccountMultiBatchInsertRace-10           2.46k ± 3%     0.12k ± 1%  -95.19%  (p=0.008 n=5+5)
PoolAccountMultiBatchInsertNoLockRace-10     1.34k ± 0%     0.08k ± 0%  -93.87%  (p=0.008 n=5+5)
PoolAccountsBatchInsert-10                    51.0 ± 0%      47.0 ± 0%   -7.84%  (p=0.008 n=5+5)
PoolAccountsBatchInsertRace-10               2.32k ± 0%     0.12k ± 3%  -95.03%  (p=0.008 n=5+5)
PoolAccountsBatchInsertNoLockRace-10         1.34k ± 0%     0.08k ± 0%  -93.95%  (p=0.029 n=4+4)

new_locals_err.txt
new_locals.txt

@JekaMas

JekaMas commented Oct 23, 2022

Copy link
Copy Markdown
Contributor Author

and the same comparing to develop branch:

benchstat old_locals.txt new_locals_err.txt                
name                                      old time/op    new time/op    delta
PoolBatchInsert100-10                       6.06ms ± 2%    5.81ms ± 2%   -4.11%  (p=0.008 n=5+5)
PoolBatchInsert1000-10                      60.0ms ± 0%    58.1ms ± 3%     ~     (p=0.056 n=5+5)
PoolBatchInsert10000-10                      591ms ± 0%     627ms ±15%     ~     (p=0.190 n=4+5)
PoolBatchLocalInsert100-10                  6.56ms ± 1%    6.52ms ± 2%     ~     (p=0.310 n=5+5)
PoolBatchLocalInsert1000-10                 66.8ms ±14%    64.4ms ± 2%     ~     (p=0.548 n=5+5)
PoolBatchLocalInsert10000-10                 670ms ± 6%     637ms ± 3%   -4.84%  (p=0.032 n=5+5)
PoolAccountMultiBatchInsert-10               164µs ± 3%     114µs ± 1%  -30.63%  (p=0.008 n=5+5)
PoolAccountMultiBatchInsertRace-10          2.92ms ± 6%    0.43ms ± 5%  -85.14%  (p=0.008 n=5+5)
PoolAccountMultiBatchInsertNoLockRace-10     816µs ± 6%     245µs ± 9%  -69.93%  (p=0.008 n=5+5)
PoolAccountsBatchInsert-10                   157µs ± 1%     116µs ± 9%  -26.35%  (p=0.016 n=4+5)
PoolAccountsBatchInsertRace-10              2.03ms ± 5%    0.43ms ±13%  -78.71%  (p=0.008 n=5+5)
PoolAccountsBatchInsertNoLockRace-10         837µs ± 4%     262µs ±10%  -68.63%  (p=0.008 n=5+5)

name                                      old alloc/op   new alloc/op   delta
PoolBatchInsert100-10                        204kB ± 0%     153kB ± 0%  -24.89%  (p=0.008 n=5+5)
PoolBatchInsert1000-10                      2.08MB ± 0%    1.56MB ± 0%  -25.10%  (p=0.016 n=5+4)
PoolBatchInsert10000-10                     19.0MB ± 0%    14.7MB ± 0%  -22.76%  (p=0.008 n=5+5)
PoolBatchLocalInsert100-10                  4.10MB ± 1%    4.16MB ± 2%     ~     (p=0.056 n=5+5)
PoolBatchLocalInsert1000-10                 38.0MB ± 6%    40.3MB ± 5%     ~     (p=0.548 n=5+5)
PoolBatchLocalInsert10000-10                 431MB ± 0%     425MB ± 0%   -1.44%  (p=0.008 n=5+5)
PoolAccountMultiBatchInsert-10              19.4kB ± 0%     2.9kB ± 0%  -85.04%  (p=0.008 n=5+5)
PoolAccountMultiBatchInsertRace-10          3.16MB ± 6%    0.42MB ± 2%  -86.59%  (p=0.008 n=5+5)
PoolAccountMultiBatchInsertNoLockRace-10     803kB ± 6%     242kB ± 0%  -69.92%  (p=0.008 n=5+5)
PoolAccountsBatchInsert-10                  19.4kB ± 0%     2.9kB ± 0%  -85.11%  (p=0.008 n=5+5)
PoolAccountsBatchInsertRace-10              1.78MB ± 3%    0.41MB ± 6%  -76.77%  (p=0.008 n=5+5)
PoolAccountsBatchInsertNoLockRace-10         832kB ± 3%     241kB ± 2%  -71.03%  (p=0.008 n=5+5)

name                                      old allocs/op  new allocs/op  delta
PoolBatchInsert100-10                        5.17k ± 0%     2.98k ± 0%  -42.29%  (p=0.016 n=4+5)
PoolBatchInsert1000-10                       51.8k ± 0%     29.8k ± 0%  -42.49%  (p=0.029 n=4+4)
PoolBatchInsert10000-10                       474k ± 0%      260k ± 0%  -45.17%  (p=0.008 n=5+5)
PoolBatchLocalInsert100-10                   5.95k ± 0%     3.24k ± 0%  -45.51%  (p=0.000 n=4+5)
PoolBatchLocalInsert1000-10                  58.8k ± 0%     31.8k ± 0%  -45.92%  (p=0.008 n=5+5)
PoolBatchLocalInsert10000-10                  587k ± 0%      317k ± 0%  -45.97%  (p=0.008 n=5+5)
PoolAccountMultiBatchInsert-10                79.0 ± 0%      49.0 ± 0%  -37.97%  (p=0.008 n=5+5)
PoolAccountMultiBatchInsertRace-10           16.4k ± 6%      0.1k ± 1%  -99.28%  (p=0.008 n=5+5)
PoolAccountMultiBatchInsertNoLockRace-10     4.09k ± 7%     0.08k ± 0%  -97.99%  (p=0.008 n=5+5)
PoolAccountsBatchInsert-10                    79.0 ± 0%      47.0 ± 0%  -40.51%  (p=0.008 n=5+5)
PoolAccountsBatchInsertRace-10               10.1k ± 4%      0.1k ± 3%  -98.86%  (p=0.008 n=5+5)
PoolAccountsBatchInsertNoLockRace-10         4.27k ± 3%     0.08k ± 0%  -98.10%  (p=0.016 n=5+4)

new_locals_err.txt
old_locals.txt

@JekaMas

JekaMas commented Oct 24, 2022

Copy link
Copy Markdown
Contributor Author
benchstat pending_new.txt pending_old.txt 

name                                           old time/op    new time/op     delta
PoolBatchInsert/size_100,_is_local_false-10      5.68ms ± 2%     5.19ms ± 4%   ~     (p=0.100 n=3+3)
PoolBatchInsert/size_1000,_is_local_false-10     57.7ms ± 0%     57.0ms ± 0%   ~     (p=0.100 n=3+3)
PoolBatchInsert/size_10000,_is_local_false-10     574ms ± 0%      489ms ± 0%   ~     (p=0.100 n=3+3)
PoolBatchInsert/size_100,_is_local_true-10       14.2ms ±97%     14.6ms ±91%   ~     (p=1.000 n=3+3)
PoolBatchInsert/size_1000,_is_local_true-10       994µs ± 0%      944µs ± 3%   ~     (p=0.100 n=3+3)
PoolBatchInsert/size_10000,_is_local_true-10     10.2ms ± 3%    57.7ms ±162%   ~     (p=0.100 n=3+3)
PoolMining/size_1-10                              985ns ± 2%     1571ns ± 9%   ~     (p=0.100 n=3+3)
PoolMining/size_5-10                             3.52µs ± 1%     6.11µs ± 2%   ~     (p=0.100 n=3+3)
PoolMining/size_10-10                            6.92µs ± 1%    11.36µs ± 1%   ~     (p=0.100 n=3+3)
PoolMining/size_20-10                            12.5µs ± 1%     21.3µs ± 1%   ~     (p=0.100 n=3+3)
PoolAccountMultiBatchInsert-10                    114µs ± 2%      148µs ± 1%   ~     (p=0.100 n=3+3)
PoolAccountMultiBatchInsertRace-10                442µs ± 9%     2888µs ± 4%   ~     (p=0.100 n=3+3)
PoolAccountMultiBatchInsertNoLockRace-10          237µs ± 1%      832µs ± 2%   ~     (p=0.100 n=3+3)
PoolAccountsBatchInsert-10                        112µs ± 0%      148µs ± 1%   ~     (p=0.100 n=3+3)
PoolAccountsBatchInsertRace-10                    420µs ± 0%     2777µs ± 6%   ~     (p=0.100 n=3+3)
PoolAccountsBatchInsertNoLockRace-10              239µs ± 0%      789µs ±10%   ~     (p=0.100 n=3+3)

name                                           old alloc/op   new alloc/op    delta
PoolBatchInsert/size_100,_is_local_false-10       136kB ± 4%      162kB ± 4%   ~     (p=0.100 n=3+3)
PoolBatchInsert/size_1000,_is_local_false-10     1.38MB ± 0%     1.78MB ± 0%   ~     (p=0.100 n=3+3)
PoolBatchInsert/size_10000,_is_local_false-10    14.0MB ± 3%     13.9MB ± 0%   ~     (p=0.700 n=3+3)
PoolBatchInsert/size_100,_is_local_true-10        201MB ±97%     195MB ±103%   ~     (p=1.000 n=3+3)
PoolBatchInsert/size_1000,_is_local_true-10       123kB ± 0%       89kB ± 0%   ~     (p=0.100 n=3+3)
PoolBatchInsert/size_10000,_is_local_true-10     1.41MB ± 0%  595.65MB ±200%   ~     (p=0.700 n=3+3)
PoolMining/size_1-10                               992B ± 0%      1584B ± 0%   ~     (p=0.100 n=3+3)
PoolMining/size_5-10                               992B ± 0%      4784B ± 0%   ~     (p=0.100 n=3+3)
PoolMining/size_10-10                              992B ± 0%      8880B ± 0%   ~     (p=0.100 n=3+3)
PoolMining/size_20-10                              992B ± 0%     17072B ± 0%   ~     (p=0.100 n=3+3)
PoolAccountMultiBatchInsert-10                   2.89kB ± 0%    19.36kB ± 0%   ~     (p=0.100 n=3+3)
PoolAccountMultiBatchInsertRace-10                432kB ± 1%     3388kB ± 1%   ~     (p=0.100 n=3+3)
PoolAccountMultiBatchInsertNoLockRace-10          243kB ± 2%      949kB ± 1%   ~     (p=0.100 n=3+3)
PoolAccountsBatchInsert-10                       2.87kB ± 0%    19.36kB ± 0%   ~     (p=0.100 n=3+3)
PoolAccountsBatchInsertRace-10                    432kB ± 1%     3264kB ± 3%   ~     (p=0.100 n=3+3)
PoolAccountsBatchInsertNoLockRace-10              245kB ± 0%      881kB ±16%   ~     (p=0.100 n=3+3)

name                                           old allocs/op  new allocs/op   delta
PoolBatchInsert/size_100,_is_local_false-10       2.67k ± 3%      4.23k ± 4%   ~     (p=0.100 n=3+3)
PoolBatchInsert/size_1000,_is_local_false-10      27.2k ± 0%      46.4k ± 0%   ~     (p=0.100 n=3+3)
PoolBatchInsert/size_10000,_is_local_false-10      265k ± 0%       362k ± 0%   ~     (p=0.100 n=3+3)
PoolBatchInsert/size_100,_is_local_true-10        1.80k ±71%      3.86k ±65%   ~     (p=0.400 n=3+3)
PoolBatchInsert/size_1000,_is_local_true-10       2.01k ± 0%      2.00k ± 0%   ~     (p=0.100 n=3+3)
PoolBatchInsert/size_10000,_is_local_true-10      20.0k ± 0%      23.4k ±29%   ~     (p=0.400 n=3+3)
PoolMining/size_1-10                               8.00 ± 0%      13.00 ± 0%   ~     (p=0.100 n=3+3)
PoolMining/size_5-10                               8.00 ± 0%      13.00 ± 0%   ~     (p=0.100 n=3+3)
PoolMining/size_10-10                              8.00 ± 0%      13.00 ± 0%   ~     (p=0.100 n=3+3)
PoolMining/size_20-10                              8.00 ± 0%      13.00 ± 0%   ~     (p=0.100 n=3+3)
PoolAccountMultiBatchInsert-10                     48.0 ± 0%       79.0 ± 0%   ~     (p=0.100 n=3+3)
PoolAccountMultiBatchInsertRace-10                  118 ± 1%      17540 ± 2%   ~     (p=0.100 n=3+3)
PoolAccountMultiBatchInsertNoLockRace-10           80.7 ± 1%     4874.3 ± 1%   ~     (p=0.100 n=3+3)
PoolAccountsBatchInsert-10                         46.0 ± 0%       79.0 ± 0%   ~     (p=0.100 n=3+3)
PoolAccountsBatchInsertRace-10                      117 ± 1%      16883 ± 3%   ~     (p=0.100 n=3+3)
PoolAccountsBatchInsertNoLockRace-10               79.7 ± 1%     4507.7 ±16%   ~     (p=0.100 n=3+3)

pending_old.txt
pending_new.txt

@0xKrishna 0xKrishna closed this Nov 10, 2022
@petejkim

Copy link
Copy Markdown

In which release will this PR be included?

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.

6 participants