• Russ Cox's avatar
    runtime: use manual stack for garbage collection · d4cc557b
    Russ Cox authored
    Old code was using recursion to traverse object graph.
    New code uses an explicit stack, cutting the per-pointer
    footprint to two words during the recursion and avoiding
    the standard allocator and stack splitting code.
    
    in test/garbage:
    
    Reduces parser runtime by 2-3%
    Reduces Peano runtime by 40%
    Increases tree runtime by 4-5%
    
    R=r
    CC=golang-dev
    https://golang.org/cl/2150042
    d4cc557b
debug.go 5.06 KB