Skip to content

Encode methods should accept []byte #21

Open
@AlekSi

Description

@AlekSi

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.

Metadata

Metadata

Assignees

Labels

code/perfPerformance improvements

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions