• Roger Peppe's avatar
    fmt: make recursive scan more efficient. · 5bd284e8
    Roger Peppe authored
    Detect when scan is being called recursively and
    re-use the same scan state.
    
    On my machine, for a recursion-heavy benchmark, this
    results in 44x speed up. This does impose a 4% penalty
    on the non-recursive case, which can be removed by
    heap-allocating the saved state, at 40% performance penalty
    on the recursive case. Either way is fine with me.
    
    R=r
    CC=golang-dev
    https://golang.org/cl/4253049
    5bd284e8
Name
Last commit
Last update
doc Loading commit data...
include Loading commit data...
lib Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.hgignore Loading commit data...
.hgtags Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...