Page MenuHomePhabricator

Prevector Quick Destruct
ClosedPublic

Authored by deadalnix on Sep 30 2018, 14:40.

Details

Summary
  • Add prevector destructor benchmark
  • Only call clear on prevector if it isn't trivially destructible and don't loop in clear

This is a backport of Core PR9505

Test Plan
make
./src/bench/bench_bitcoin

Diff Detail

Repository
rABC Bitcoin ABC
Branch
prevectrodestruct
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 3453
Build 4982: Bitcoin ABC Buildbot (legacy)
Build 4981: arc lint + arc unit

Event Timeline

jasonbcox requested changes to this revision.Sep 30 2018, 16:50
jasonbcox added a subscriber: jasonbcox.
jasonbcox added inline comments.
src/bench/prevector_destructor.cpp
14

Any reason t1 cannot be removed and the second resize be applied to t0?

27

Same question as above.

28

shouldn't this be t1?

This revision now requires changes to proceed.Sep 30 2018, 16:50
deadalnix added inline comments.
src/bench/prevector_destructor.cpp
14

You want to check the destruction of vector that are within and out of bounds with the preallocated buffer.

28

Probably. It's definitively t0 in core.

Fix t0.clear() => t1.clear()

This revision is now accepted and ready to land.Sep 30 2018, 19:29
This revision was automatically updated to reflect the committed changes.