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
Uint128_t native #3205
Uint128_t native #3205
Conversation
338987b
to
6cb63c0
Compare
Updated to fix bug in |
src/herder/TransactionQueue.cpp
Outdated
Rounding::ROUND_UP); | ||
opsToFlood = | ||
mBroadcastOpCarryover + | ||
bigDivide(opsToFloodLedger, int64_t(cfg.FLOOD_TX_PERIOD_MS), |
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 think it would be safer to just avoid function overloading (as it's way too easy to forget to cast like this), we can just rename the version that takes an uint128 into bigDivide128
or something like that
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.
fixed at some length -- wound up renaming all the overloads in numeric.h because I couldn't tell in a lot of cases which overload was even being called in which order. Easiest fix was to split them all apart and just check (and possibly rewrite) each callsite to call the version that corresponds to what I think was meant by the operands passed and surrounding code. This should be carefully reviewed, especially by @jonjove !
6cb63c0
to
42b9bc5
Compare
42b9bc5
to
9d69b7b
Compare
9d69b7b
to
177c166
Compare
r+ 177c166 |
Uint128_t native Reviewed-by: MonsieurNicolas
I had to stop this while getting 18.0.3 out the door, rekicking |
@latobarita: retry |
This is an experiment in using compiler-native uint128_t types when they are available (on gcc and clang), as a possible performance improvement over the library type. Need to discuss a bit, but it seems to work.