Closed hskang9 closed 1 year ago
As I can see, gas cost increases after replacing wee_alloc
with lol_alloc
. It's not good. Does it make sense to replace wee_alloc
?
I agree that increasing near gas cost is not good. However, wee_alloc
is not maintained. Maybe there will be an improvement in lol_alloc
? If one cares about the security, it may be better to switch to the cargo that is in active development. But still, if we could predict what wee_alloc
will do and confirm no trouble, I think we can stay with wee_alloc
.
wee_alloc
was deprecated and no longer maintained. To ensure highest quality, we should strive to seek better alternatives. However, that being said, NEAR SDK does still use wee_alloc
. See: near/near-sdk/src/lib.rs#L55
And one more. wee_alloc
has more than a million downloads, and lol_alloc
has more than one thousand.
Closing, as this kind of issue isn't one we are concerned about and will remain with whatever NEAR SDK uses.
Description
This PR replaces
wee_alloc
cargo that is not currently being maintained from dependabot.Performance / NEAR gas cost considerations
Changing allocator increased the near gas cost by 1~5
Testing
All existing tests should pass on the new global allocator
How should this be reviewed
See if there are other options on setting global allocator through
lol_alloc
for optimization on allocating memory and decreasing near gas cost.Additional information