gob: avoid one copy for every message written.
Plus the need for a second in-memory buffer. Plays a bit fast and loose with the contents of a byte buffer, but saves a potentially huge allocation. The gotest run is about 10% faster overall after this change. R=golang-dev, r, gri CC=golang-dev https://golang.org/cl/5236043
Showing
Please register or sign in to comment