• Keith Randall's avatar
    runtime: new itab lookup table · 3d1699ea
    Keith Randall authored
    Keep itabs in a growable hash table.
    Use a simple open-addressable hash table, quadratic probing, power
    of two sized.
    Synchronization gets a bit more tricky. The common read path now
    has two atomic reads, one to get the table pointer and one to read
    the entry out of the table.
    
    I set the max load factor to 75%, kind of arbitrarily. There's a
    space-speed tradeoff here, and I'm not sure where we should land.
    
    Because we use open addressing the itab.link field is no longer needed.
    I'll remove it in a separate CL.
    
    Fixes #20505
    
    Change-Id: Ifb3d9a337512d6cf968c1fceb1eeaf89559afebf
    Reviewed-on: https://go-review.googlesource.com/44472
    Run-TryBot: Keith Randall <khr@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarJosh Bleecher Snyder <josharian@gmail.com>
    3d1699ea
Name
Last commit
Last update
..
all_test.go Loading commit data...
asm_386.s Loading commit data...
asm_amd64.s Loading commit data...
asm_amd64p32.s Loading commit data...
asm_arm.s Loading commit data...
asm_arm64.s Loading commit data...
asm_mips64x.s Loading commit data...
asm_mipsx.s Loading commit data...
asm_ppc64x.s Loading commit data...
asm_s390x.s Loading commit data...
deepequal.go Loading commit data...
example_test.go Loading commit data...
export_test.go Loading commit data...
makefunc.go Loading commit data...
set_test.go Loading commit data...
swapper.go Loading commit data...
tostring_test.go Loading commit data...
type.go Loading commit data...
value.go Loading commit data...