Open polydez opened 7 months ago
I'd personally use both approaches, at least the first one (not sure, that we need to insert values randomly).
I would start with the first one - I think it should get us most of the benefit. The second one can be implemented much later (and only if we discover that we need it).
Currently
SimpleSmt
recomputes inner node hashes on each insert. It computes and writes hashes starting from inserted node and up to the root. It might lead to unnecessary computations during bulk inserts (for example,SimpleSmt::with_leaves
andSimpleSmt::with_contiguous_leaves
useinsert
under the hood).We can use different approaches for such optimization. For example:
with_leaves
, and similar).