{"push_id":591267003,"size":1,"distinct_size":1,"ref":"refs/heads/master","head":"100439223a48f6373cd2e8881f05b94a59c7f16a","before":"eeef758cd56268f69c3ec2ee3e3a6205c6502cef","commits":[{"sha":"100439223a48f6373cd2e8881f05b94a59c7f16a","author":{"email":"9d74a8243f506b23acce2321ee7c4364bfc5a9bf@gmail.com","name":"Jed Denlea"},"message":"Avoid unnecessary net.Addr string allocations\n\nClients use maps of strings to keep track of connections, while the\nServerSelector interface returns net.Addrs.  To map a net.Addr from the\nselector to a connection pool, `String()` is called.  And if a new\nconnection is necessary, `Network()` must be called as well.  This means\nthat, even if you have only one memcache backend and many persistent\nconnections, you still end up regenerating its address, and allocating a\nstring for it, over and over.\n\nThis commit introduces a simple struct which acts as a wrapper to a\nnet.Addr, caching its `String()` and `Network()` values.  If your\nmemcache client produces any significant traffic, this will avoid\npotentially many allocations.\n\nBefore:\nBenchmarkOnItem    300000        4317 ns/op       160 B/op  20 allocs/op\n\nNow:\nBenchmarkOnItem   1000000        1396 ns/op         0 B/op   0 allocs/op","distinct":true,"url":"https://api.github.com/repos/fastly/gomemcache/commits/100439223a48f6373cd2e8881f05b94a59c7f16a"}]}