-
Notifications
You must be signed in to change notification settings - Fork 37.8k
Minimal fix to slow prevector tests as stopgap measure #8671
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
Conversation
BenchmarksOn my local machine on a 32-bit win build running just PrevectorTests goes from taking 4 minutes + 24 seconds to 1.2 seconds with this patch. |
Concept ACK |
utACK |
concept ACk |
Travis BenchmarksComparing this build to the head build time for make check to run: Job 2 (i686-w64-mingw32)678s→337s data:https://travis-ci.org/bitcoin/bitcoin/jobs/157997974 Job 4 (x86_64-w64-mingw32)529s→196s data:https://travis-ci.org/bitcoin/bitcoin/jobs/157997976 |
utACK f71d4a3 |
Thanks! utACK f71d4a3 |
f71d4a3 Minimal fix to slow prevector tests as stopgap measure (Jeremy Rubin)
b886a4c Fix header guards using reserved identifiers (Dan Raviv) b389b3f speed up Unserialize_impl for prevector (Akio Nakamura) 13d2102 Minimal fix to slow prevector tests as stopgap measure (Jeremy Rubin) Pull request description: Backports bitcoin#12324. The `DeserializeAndCheckBlock` benchmark (introduced in #2146) shows a speedup of about 4% (not as much as the upstream PR, due to the optimizations already included in #2083). Cherry-picks also - bitcoin#8671 (with minimal changes to the random context, due to bitcoin#8914 and bitcoin#9792 being already ported out of order). - bitcoin#11151 ACKs for top commit: Fuzzbawls: utACK b886a4c furszy: utACK b886a4c and merging.. Tree-SHA512: f5de40e5acfb0b875d413d8995d71dd90489730fe4853f0be03d76a1c44ec95eaeb28c0c40d8e91906f23529ad26501bda4f9779ce466cd8603ed97f1662ca98
Fix prevector bugs. Backports: bitcoin/bitcoin#7888 bitcoin/bitcoin#8671 Commits below are listed in stack order. pick bitcoin/bitcoin@f71d4a3 pick bitcoin/bitcoin@a7af72a pick bitcoin/bitcoin@4ed41a2 pick bitcoin/bitcoin@1e2c29f
Tests are really slow because of BOOST_CHECK doing a lot of unnecessary things in wine, BOOST_CHECK can't just be ripped out because some people rely on certain features for there dev process.
In lieu of a more permanent fix, this PR minimally modifies PrevectorTests to use a local check. To make sure this local check isn't useless, it gets the seeds from the insecure random to allow tests to be repeated.
This should be an easy to merge PR; discussion about generally improving the unit test performance/framework beyond this can go here: #8670