Details
-
Improvement
-
Resolution: Fixed
-
Minor
-
3.0.0-alpha
-
1
Description
The current approach allocates a List<byte>, builds the result, allocates a byte[] and copies to it (via .ToArray()), and then takes that and copies it to a segment of another byte[]. That's two heap allocations and one additional bit blit that are unnecessary. The algorithm can instead write directly to the target array.
Attachments
For Gerrit Dashboard: NCBC-1881 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
106571,2 | NCBC-1881: Rewrite Leb128 to avoid heap alloc | master | couchbase-net-client | Status: MERGED | +2 | +1 |