• Robert Griesemer's avatar
    reflect: fix FieldByNameFunc · aa388017
    Robert Griesemer authored
    The existing algorithm did not properly propagate the type
    count from one level to the next, and as a consequence it
    missed collisions.
    
    Properly propagate multiplicity (count) information to the
    next level.
    
    benchmark                old ns/op    new ns/op    delta
    BenchmarkFieldByName1          182          180   -1.10%
    BenchmarkFieldByName2         6273         6183   -1.43%
    BenchmarkFieldByName3        49267        46784   -5.04%
    
    Fixes #4355.
    
    R=rsc
    CC=golang-dev
    https://golang.org/cl/6821094
    aa388017
Name
Last commit
Last update
..
all_test.go Loading commit data...
asm_386.s Loading commit data...
asm_amd64.s Loading commit data...
asm_arm.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...
tostring_test.go Loading commit data...
type.go Loading commit data...
value.go Loading commit data...