bench: fix incorrect behaviour in prevector.cpp #13598

pull AkioNak wants to merge 1 commits into bitcoin:master from AkioNak:fix_bench_prevector changing 1 files +3 −3
  1. AkioNak commented at 11:25 AM on July 5, 2018: contributor

    This patch intends to fix some incorrect action of bench/prevector.cpp.

    1. PrevectorClear() 2nd call of clear() should to operate t1 instead of t0. This patch changes t0 to t1.

    2. PREVECTOR_TEST() PREVECTOR_TEST macro should to call both PrevectorXX<nontrivial_t>(state) and PrevectorXX<trivial_t>(state) by specific "name" which given by parameter instead of calling PrevectorResize<>() regardless of "name". This patch changes "PrevectorResize<" of this macro to "Prevector ## name<".

  2. fix bench/prevector.cpp
    1. PrevectorClear()
    2nd call of clear() should to operate t1 instead of t0.
    This patch changes t0 to t1.
    
    2. PREVECTOR_TEST()
    PREVECTOR_TEST macro should to call both
    PrevectorXX<nontrivial_t>(state) and PrevectorXX<trivial_t>(state)
    by specific "name" which given by parameter instead of calling
    PrevectorResize<>() regardless of "name".
    This patch changes "PrevectorResize<" of this macro to
    "Prevector ## name<".
    1fc605a8ae
  3. fanquake added the label Tests on Jul 5, 2018
  4. laanwj requested review from eklitzke on Jul 5, 2018
  5. laanwj requested review from sipa on Jul 5, 2018
  6. laanwj commented at 11:48 AM on July 5, 2018: member

    requesting review from @eklitzke as he wrote this code, and @sipa as he wrote prevector

  7. fanquake renamed this:
    fix bench/prevector.cpp
    bench: fix incorrect behaviour in prevector.cpp
    on Jul 5, 2018
  8. Empact commented at 3:54 AM on July 6, 2018: member

    utACK 1fc605a could you post before and after bench results?

  9. AkioNak commented at 5:49 AM on July 6, 2018: contributor

    @Empact Here are bench results with following commnad. $ ./src/bench/bench_bitcoin -evals=10 -scaling=10 -filter="Prevector.*"

    [before PR - commit b77c38e06c7f7383066f921db628a3616946cfe5]

    # Benchmark, evals, iterations, total, min, max, median
    PrevectorClearNontrivial, 10, 283000, 59.4821, 2.09621e-05, 2.1196e-05, 2.09974e-05
    PrevectorClearTrivial, 10, 886000, 145.059, 1.59502e-05, 1.68805e-05, 1.65078e-05
    PrevectorDestructorNontrivial, 10, 288000, 60.3588, 2.09195e-05, 2.10065e-05, 2.09665e-05
    PrevectorDestructorTrivial, 10, 889000, 145.332, 1.60774e-05, 1.6738e-05, 1.64275e-05
    PrevectorResizeNontrivial, 10, 289000, 60.7665, 2.09403e-05, 2.13862e-05, 2.09864e-05
    PrevectorResizeTrivial, 10, 903000, 148.11, 1.61196e-05, 1.67847e-05, 1.64389e-05
    

    [after PR - commit 1fc605a8aea247b2d5776c22b3e187d1b190fd99]

    # Benchmark, evals, iterations, total, min, max, median
    PrevectorClearNontrivial, 10, 283000, 230.882, 8.08939e-05, 8.22661e-05, 8.16923e-05
    PrevectorClearTrivial, 10, 886000, 0.0189387, 1.76885e-09, 2.30331e-09, 2.21226e-09
    PrevectorDestructorNontrivial, 10, 288000, 0.00586112, 1.76897e-09, 2.21958e-09, 2.21111e-09
    PrevectorDestructorTrivial, 10, 889000, 0.0174586, 1.76884e-09, 2.24671e-09, 2.06272e-09
    PrevectorResizeNontrivial, 10, 289000, 61.6133, 2.11421e-05, 2.1488e-05, 2.13635e-05
    PrevectorResizeTrivial, 10, 903000, 149.323, 1.61569e-05, 1.68357e-05, 1.65747e-05
    
  10. MarcoFalke commented at 6:58 AM on July 6, 2018: member

    utACK 1fc605a8aea247b2d5776c22b3e187d1b190fd99

  11. MarcoFalke merged this on Jul 6, 2018
  12. MarcoFalke closed this on Jul 6, 2018

  13. MarcoFalke referenced this in commit 0212187fc6 on Jul 6, 2018
  14. AkioNak deleted the branch on Jul 9, 2018
  15. PastaPastaPasta referenced this in commit 8a07a0461c on Jul 9, 2020
  16. PastaPastaPasta referenced this in commit 9e344a8276 on Jul 9, 2020
  17. gades referenced this in commit f453258ac0 on Jun 30, 2021
  18. MarcoFalke locked this on Sep 8, 2021


eklitzkesipa

Labels

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-02 03:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me