Open 0x009922 opened 2 months ago
Compact
A "compact" or general integer encoding is sufficient for encoding large integers (up to 2**536) and is more efficient at encoding most values than the fixed-width version. (Though for single-byte values, the fixed-width integer is never worse.)
- https://docs.substrate.io/reference/scale-codec/
Here is an example of how it is already used for Status structure:
Status
https://github.com/hyperledger/iroha/blob/b9f28442bf4225f1647901629a4baed3b122cc3c/telemetry/src/metrics.rs#L50-L71
Investigate the cost via profiling & benchmarks.
What is
Compact
- https://docs.substrate.io/reference/scale-codec/
Here is an example of how it is already used for
Status
structure:https://github.com/hyperledger/iroha/blob/b9f28442bf4225f1647901629a4baed3b122cc3c/telemetry/src/metrics.rs#L50-L71
Pros
Cons
TODO
Investigate the cost via profiling & benchmarks.