Re: [go-nuts] efficiency of string <-> []byte conversion

2017-02-14 Thread martisch
some more uses: string([]byte): // Some internal compiler optimizations use this function. // - Used for m[string(k)] lookup where m is a string-keyed map and k is a []byte. // - Used for "<"+string(b)+">" concatenation where b is []byte. // - Used for string(b)=="foo" comparison where b is

Re: [go-nuts] Is there a reason go doesn't use the small string optomization

2017-02-01 Thread martisch
>From what i read the top 16 bits in a pointer are generally not completely ignored by the cpu in x86-64 virtual address space: AMD64 Architecture Programmer’s Manual Volume 1 - 2.2.2 64-Bit Canonical Addresses: "Although implementations might not use all 64 bits of the virtual address, they