Simon Cruanes
Simon Cruanes
Modifying the main internal AST, perhaps not. If you modify one of the main types (like `Yojson.Safe.t` or `Yojson.Basic.t` it is most definitely a big breaking change. Lots of libraries...
I think there are alternative assets, e.g. on http://www.minecrafttexturepacks.com/ . Need to check the license though.
For nested types, wouldn't that mean traversing the values several times? And performing the varint encoding several times too, to measure how many bytes are required? This can still be...
Is this really worth the complexity? Allocating a bigstring might fall short (if it's too small), causing a lot of trouble to re-encode again with a larger buffer. Computing sizes...
Where do you store the precomputed sizes? The types to be encoded are external, they don't have hidden fields to store their length, as far as I can tell. If...
@RNabel I tried the write-from-backward method in #169 and it's not a big improvement on my (synthetic) benchmark. Reusing sub-buffers is simpler and better. However. I have an idea on...
Yes, that's an idea. It takes 20 lines to do a little custom one for protoc. The issue though is that i think this would need more code generation (for...
There's still copying, but it doesn't mean it's slower than traversing twice and storing sizes in a side-buffer (which is also more complex, I think, because of the need for...
About the size function: https://github.com/gogo/protobuf/issues/559 . They seem to have settled to writing backwards, which is definitely the _cleanest_ solution conceptually, I think.
Exactly, that's what the benchmark example already does: resizing like any other dynamic vector, but once you resize you copy to the end, not the beginning. So really it just...