LEB128 algorithm performs unnecessary heap allocations

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.

Environment

None

Gerrit Reviews

None

Release Notes Description

None

Activity

Show:
Fixed
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Labels

Story Points

Components

Fix versions

Affects versions

Priority

Instabug

Open Instabug

PagerDuty

Sentry

Zendesk Support

Created March 21, 2019 at 12:09 PM
Updated April 24, 2020 at 8:22 PM
Resolved March 21, 2019 at 3:29 PM
Instabug