Yes, it currently requires two lookups (two hashes, two bucket searches,
etc.). This general problem is issue 17133
(https://github.com/golang/go/issues/17133). Your example has the extra
complication that the update operation is an append, not just a +=.
On Sunday, November 27, 2016 at 7:00
You can get the CFG (control flow graph) for a function by setting the
environment variable GOSSAFUNC to the function in question when building.
It will generate a file named ssa.html in the current directory which you
can load into a browser. It doesn't draw the CFG explicitly but the nodes
(b
On Saturday, November 5, 2016 at 7:48:27 AM UTC-7, leob...@gmail.com wrote:
>
> Hey,
>
> I have a scenario where I need to iterate over (as many as possible) map
> entries and send them into a channel.
> The operation on the other end of the channel can take a long time, so
> sends on the chann
Tamás's suggestion of using [4]string as the key is a good one. You could
use any struct you want as well, if you want to name the parts of the key.
How are you using the map? If you're only reading the map, then concurrent
access is allowed. Concurrent access is only forbidden if one of the
Yes, it is. The optimization occurs for any occurrence of
m[string(expression of type []byte)]. Where the byte slice came from
(global or otherwise) is irrelevant.
On Monday, July 25, 2016 at 8:37:03 AM UTC-7, T L wrote:
>
> @Randall, thanks for answer.
> You mean the answer is yes, right?
--
This was a concern when we originally implemented the m[string(b)]
optimization. If someone is simultaneously modifying b, then weird things
happen during the lookup. But it won't crash anything, just maybe not
return what you expect. And that's ok in cases of a data race, the spec
makes no
On Monday, June 20, 2016 at 6:33:29 AM UTC-7, gordo...@gmail.com wrote:
>
> Further to the subject of compiler efficiency, the following is the
> assembler code output with array bounds checking turned off (-B) the the
> inner tight composite culling loop of FasterEratspeed above (generated wit
Looks like something is wrong with immediate loading for the 1 << ...
operation. Could you open a bug with repro instructions? I can look at it
when 1.8 opens.
On Thursday, June 16, 2016 at 5:30:12 PM UTC-7, gordo...@gmail.com wrote:
>
> > Modern x86 CPUs don't work like that.
>
> > In genera
I do x & (0x - 1<<32).
On Tuesday, June 14, 2016 at 1:44:14 PM UTC-7, Michael Jones wrote:
>
> I have fought this many times.
>
> What I almost always do is cast all variables involved as unsigned so that
> I can express the logical operations as desired. The exception is right
> shift
101 - 109 of 109 matches
Mail list logo