[go-nuts] Re: How runtime.newobjcet is optimized in map access?

2016-08-27 Thread 'Alan Donovan' via golang-nuts
On 27 August 2016 at 00:21, Peng Gao wrote: > > Is there any good for complier or is just a simplification? > It doesn't change the escape aspects of this code, but it makes the program smaller and thus easier to read and possibly faster. Sorry, I made a wrong description about Get, in fact c

[go-nuts] Re: How runtime.newobjcet is optimized in map access?

2016-08-26 Thread adonovan via golang-nuts
On Friday, 26 August 2016 06:02:56 UTC-4, Peng Gao wrote: > > I am doing a bench for my map-based cache. > > the get implementation is the same > // Get an item from the cache. Returns the item or nil, and a bool > indicating > // whether the key was found. > func (c *cache) Get(k string) (interfa