• Josh Bleecher Snyder's avatar
    sort: reduce leaf calls in Stable · 2a617d46
    Josh Bleecher Snyder authored
    Move the symMerge recursion stopping condition
    from the beginning of symMerge to the callers.
    
    This halves the number of calls to symMerge
    while running 'go test sort'.
    
    benchmark                   old ns/op      new ns/op      delta
    BenchmarkStable1e6          8358117060     7954143849     -4.83%
    BenchmarkStable1e4          40116117       38583285       -3.82%
    BenchmarkStableInt1K        119150         115182         -3.33%
    BenchmarkStableInt64K       9799845        9515475        -2.90%
    BenchmarkStableString1K     388901         393516         +1.19%
    BenchmarkStable1e2          124917         123618         -1.04%
    
    Change-Id: I7ba2ca277f213b076fe6830e1139edb47ac53800
    Reviewed-on: https://go-review.googlesource.com/1820Reviewed-by: 's avatarRobert Griesemer <gri@golang.org>
    2a617d46
Name
Last commit
Last update
..
example_interface_test.go Loading commit data...
example_keys_test.go Loading commit data...
example_multi_test.go Loading commit data...
example_test.go Loading commit data...
example_wrapper_test.go Loading commit data...
export_test.go Loading commit data...
search.go Loading commit data...
search_test.go Loading commit data...
sort.go Loading commit data...
sort_test.go Loading commit data...