Open
Description
Hello,
I was wondering about the expected performance overheads when I am using the stable BTreeMap structure.
I wanted to split a buffer of 100Mb into small 4K chunks and store those in the stable map. The performance changes radically when I try to store directly into virtual stable memory vs using the BTreeMap. I've tried three methods:
- (method store_memory) Store 100Mb into memory using memory.write, costs: 124_417_565 instructions
- (method store_buffer) Store 100Mb as a single element into the BTreeMap, costs: 924_560_255 instructions (9x slower that direct write)
- (method store_chunks) Store 100Mb as 4K blocks into the BTreeMap, costs: 10_231_263_653 instructions (100x slower than direct write)
I was wondering if this is reasonable overhead that we have.
You can check out the branch for testing: https://github.com/wasm-forge/treemap_chunks
Regards,
Stan
Metadata
Metadata
Assignees
Labels
No labels