-
Notifications
You must be signed in to change notification settings - Fork 651
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
Default less-than comparison of public_key_type
is slooooowwwwww
#2248
Comments
Known issue. Unfortunately simply adding an explicit For use cases like
to
Related code: bitshares-core/libraries/protocol/include/graphene/protocol/types.hpp Lines 269 to 274 in 349e006
|
Probably a better solution is to add a faster default comparison function, and update the code that impacts consensus to use an explicit "old" comparison function. |
I was afraid it might, which is why I didn't propose a fix. I haven't seen what consensus mechanisms are affected yet, but I haven't looked too closely yet either. |
Alright, well I'd mistakenly assumed it was new information, but since it isn't, feel free to close this issue as duplicate, or not, as you see fit. :) |
Duplicate of #1371. Closing. |
Updated by @abitmore: duplicate of #1371.
--- Original Message ---
Just caught this... Fwiw:
Output:
In other words,
public_key_type
has no nativeoperator<
defined, butaddress
does andpublic_key_type
converts toaddress
implicitly, sopublic_key_type() < public_key_type()
converts both toaddress
and compares those, which means two unnecessary SHA512 calculations.Does it matter? See here
The text was updated successfully, but these errors were encountered: