Removed all allocs from Hypercore's proof code. The API is now madness though; wonder how we could do better. https://github.com/datrs/tree-index/commit/4c60b941eecc9a80ed90fede1fe691787d23eb7c …
ahaha, no no - that's good. Was hoping someone would reply. The purpose of this would be that the person calling this method is responsible, and allocates a large enough vector up front. That way memory usage can stay stable between calls - and save CPU cycles.
-
-
Because if my_vec.capacity() is large enough, it shouldn't allocate, right?
-
true -- which you might want to explicitly document somewhere if you haven't already? :) the format you can probably just omit, not sure how valuable that error message is. otoh, it's a cold path in a `panic!`
- 1 more reply
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.