Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/compile: optimize the encoding (google#38)
The simple gob encoding was showing up in profiles. This change replaces it with a simple hand-written binary encoding using strings and varints. Strings and byte slices are allocated in one contiguous block to reduce allocations. The new encoder and decoder are about 5x faster with 10x fewer allocs. + benchmark
- Loading branch information