Comments (4)
Compared to the cosmwasm-plus/cw-20 code, the following differences were identified.
Erc20 contract is stored directly in prefixed storage, and serialized by calling Uint128.u128().to_be_bytes().
However cw20 uses bucket and updates Uint128 directly.
The bucket uses the serialization of the type trait, and Uint128 serializes the base64 string according to the annotation.
Cosmwasm explains that the bucket type is helpful in removing boilerplate that occurs in frequent serialization/deserialization repetitions.
So, if you reduce the directly use of Uint128 types without casts and frequent serialization repetitions using buckets, I guess you will see a valid performance difference.
from cosmwasm.
I was changed on TODO to focus for analyzing the cache logic.
from cosmwasm.
@brew0722
Is this issue still needed? or should be closed?
from cosmwasm.
@whylee259 Although serialization that is executed to obtain the key value to be stored in storage is repeated every time, So there is an overhead.
However There seems to be no effective way to remove it.
(Buckets are just wrappers so they serialize the same. The above was my mistake.)
I'll close it.
from cosmwasm.
Related Issues (20)
- research: how to get another contract's code id / how to approve contract with admin in cw721
- Missing explanation about mock method
- idea: Multiple calls to readOnly callablepoint functions in the same contract
- Why is limit of callstack 5?
- semantic versioning rule HOT 3
- can serde_json's functons be imported and experted in cosmwasm_std? HOT 1
- [WASM] implement (de)serializer to StdError HOT 1
- Clarify the reason for changing the storage of the Number Contract using the query function, which is readOnly permission
- Correct to appropriate error message HOT 1
- Enable to catch serde error in dynamic link
- Write specifications at the WASM level
- Unify the links to `Finschia/finschia-sdk`
- Update release.md
- List to propose to upstream
- Compiling Wasm with Rust 1.70 >= leads to unsupported Wasm opcodes
- serialized_env has too much information and address is enough
- error occurs: `cargo clippy --workspace --all-targets --all-features -- -D warnings`
- Update CHANGELOG HOT 4
- Report: Benchmark of UUID Feature / Suggest: Remove UUID Feature Or Renew It HOT 3
- Function name "set_dynamic_callstack" is not good
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cosmwasm.