ref-fvm icon indicating copy to clipboard operation
ref-fvm copied to clipboard

EVM runtime: Consider uint alternative

Open mriise opened this issue 3 years ago • 1 comments

uint crate makes it's bigints from u64, which won't be as efficient as using u32 in wasm32 (collections of u32 may also be faster on x86 due to cache line sizes, but is irrelevant here).

https://github.com/RustCrypto/crypto-bigint provides bigints with pointer-sized words and constant time operations as a bonus

mriise avatar Jul 06 '22 15:07 mriise

bad idea.

karim-agha avatar Aug 23 '22 17:08 karim-agha

wasm32 isn't like x86. It has native support for 64 bit integers and will lower those operations to native 64bit instructions.

Stebalien avatar Oct 07 '22 15:10 Stebalien