Module unc_vm_types::partial_sum_map
source · Expand description
Partial sum maps
These maps allow you to efficiently store repeating sequences of a value. An example of such sequence could be the list of locals for a webassembly function.
Considering the locals example above, it might be represented as a u32
partial sum of the
local’s index. The locals between the index of the previous element and the current element
have the WpType
type. So, given
(0, u32), (10, u64), (15, f64)
then 0th local would be a u32, locals 1..=10
– u64 and locals 11..=15
– f64.
The type of a given index can be quickly found with a binary search over the partial sum field.
Structs§
- A Map from keys to values that is able to efficiently store repeating occurences of the value.
Enums§
- Errors that occur when using PartialSumMap.