-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Performance Regression Fix: Pre-Allocate txChanged vector #8681
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
src/main.cpp
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In c++11 the ugly '> >' (with a space in between) is no longer needed. Might as well fix it when you're changing it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean at this point thats just like...coding style, right?
|
Ok, maybe I incorrectly assume that I'm not alone with finding this ugly and distracting :) |
|
I think we should just wait for the eventual clang-formattening; unless you really need that byte back. |
|
I don't think a mass clang-format will happen. It's just too invasive
everywhere at the same time. It couls be done piecewise like the
-Woverwrite changes, but that's a simple thing and it takes a long time
already too.
My view is that whenever code is rewritten, we should try to bring it up to
par with coding style. But if people disagree that '> >' is something to
avoid, I will shut up about it :)
|
BenchmarkForgot to include with initial PR, it's something like 12% faster in connect postprocess. |
7d4ab3b to
ec81881
Compare
|
push -f'ed a version where txData type template extra whitespace is removed as per @sipa's request. Travis might fail because I force pushed twice and there's a known race condition on that. |
|
utACK ec81881 |
|
utACK ec81881 |
|
utACK ec81881 |
ec81881 Performance Regression Fix: Pre-Allocate txChanged vector (Jeremy Rubin)
…d vector ec81881 Performance Regression Fix: Pre-Allocate txChanged vector (Jeremy Rubin)
…d vector ec81881 Performance Regression Fix: Pre-Allocate txChanged vector (Jeremy Rubin)
…d vector ec81881 Performance Regression Fix: Pre-Allocate txChanged vector (Jeremy Rubin)
There's a non-trivial performance regression in the Connect postprocess time. Part of the problem is that the vector is not preallocated & the elements are copy-constructed. This commit should fix those two concerns, and address the performance regression significantly.
s/o to @morcos for noticing that this was a slowdown.