[go-nuts] maptype questions

2020-06-29 Thread Bill Morgan
for this code: m := make(map[int]int, 9) I think the compiler creates a maptype that is stored at type.*+60480(SB) that it uses for the call to runtime.makemap: m := make(map[int]int, 9) 0x10d0b81 488d05f8ec LEAQ type.*+60480(SB), AX 0x10d0b88 48890424 MOVQ AX, 0(SP) 0x10d0b8c

[go-nuts] who is mike?

2020-06-28 Thread Bill Morgan
who is mike wrt this commit? commit bc0b4f0d2a610059afb95ef0360704714815187d Author: Ken Thompson Date: Thu Nov 13 10:35:44 2008 -0800 mike's map code R=r OCL=19146 CL=19146 -- You received this message because you are subscribed to the Google Groups "golang-nuts"

[go-nuts] Re: [runtime] gostring question

2020-06-23 Thread Bill Morgan
On Tuesday, June 23, 2020 at 7:32:56 PM UTC-5, Bill Morgan wrote: > > I'm a C programmer so maybe this is a dumb question but, why does this > code in runtime/gostring.go allocate (rawstring) then copy data (memmove) > instead of just making the stringStruct.str point at the i

[go-nuts] [runtime] gostring question

2020-06-23 Thread Bill Morgan
I'm a C programmer so maybe this is a dumb question but, why does this code in runtime/gostring.go allocate (rawstring) then copy data (memmove) instead of just making the stringStruct.str point at the incoming data? i.e. copy the pointer instead of allocating+copying data. func gostring(p