• Russ Cox's avatar
    test/run: make errorcheck tests faster · d5887c5a
    Russ Cox authored
    Some of the errorcheck tests have many many identical regexps.
    Use a map to avoid storing the compiled form many many times
    in memory. Change the filterRe to a simple string to avoid
    the expense of those regexps as well.
    
    Cuts the time for run.go on index2.go by almost 50x.
    
    Noticed during debugging of issue 7344.
    
    LGTM=bradfitz
    R=bradfitz, josharian
    CC=golang-codereviews
    https://golang.org/cl/74380043
    d5887c5a
run.go 22.8 KB