-
Notifications
You must be signed in to change notification settings - Fork 31
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
Support for EVM pieces #192
Comments
Currently The task would be to write new uint128_t and benchmark it against existing __int128 and uint128 from https://github.com/chfast/intx/blob/master/include/intx/intx.hpp. As for uint256 it is currently unavailable in CDT, so it has to be created and benchmarked. Optionally benchmarked might be wide integers from boost multiprecision or https://github.com/abseil/abseil-cpp/blob/master/absl/numeric/int128.h |
Benchmark of uint128: |
Decision is to go with _BitInt(128) and _BitInt(256) which are supported by clang-16. BitInt is part of C23 standard. |
wide int to/from hex functions benchmark: https://github.com/mikelik/int128-benchmark/blob/main/hex.cpp |
https://github.com/mikelik/int128-benchmark Following hex conversion functions has been chosen as fastest: |
This is blocked by #185 |
If someone picks this issue up they can start off from branch: https://github.com/AntelopeIO/cdt/tree/mikelik/bitint |
no longer a performance blocker, will re-open later |
For EOS-EVM, it has been highlighted that having the following data types and functions would be beneficial.
uint128, uint256, efficient to and from hex functions, others may be added in the next few days.
The text was updated successfully, but these errors were encountered: