FerretDB / wire

Apache License 2.0
3 stars 3 forks source link

`Encode` methods should accept `[]byte` #21

Open AlekSi opened 11 months ago

AlekSi commented 11 months ago

Document.Encode and Array.Encode should accept a byte slice, not return it. Since the caller always knows the needed slice length (by calling size), this could allow for optimizing allocations by using memory pools, etc.

Run benchmarks before and after, and show benchstat output.