Descriptionsync: faster Cond
The new version does not require any memory allocations and is 30-50% faster.
Also detect and painc if Cond is copied after first.
benchmark old ns/op new ns/op delta
BenchmarkCond1 317 195 -38.49%
BenchmarkCond1-2 875 607 -30.63%
BenchmarkCond1-4 1116 548 -50.90%
BenchmarkCond1-8 1013 613 -39.49%
BenchmarkCond1-16 983 450 -54.22%
BenchmarkCond2 559 352 -37.03%
BenchmarkCond2-2 1916 1378 -28.08%
BenchmarkCond2-4 1518 1322 -12.91%
BenchmarkCond2-8 2313 1291 -44.19%
BenchmarkCond2-16 1885 1078 -42.81%
BenchmarkCond4 1070 614 -42.62%
BenchmarkCond4-2 4899 3047 -37.80%
BenchmarkCond4-4 3813 3006 -21.16%
BenchmarkCond4-8 3605 3045 -15.53%
BenchmarkCond4-16 4148 2637 -36.43%
BenchmarkCond8 2086 1264 -39.41%
BenchmarkCond8-2 9961 6736 -32.38%
BenchmarkCond8-4 8135 7689 -5.48%
BenchmarkCond8-8 9623 7517 -21.89%
BenchmarkCond8-16 11661 8093 -30.60%
Patch Set 1 #Patch Set 2 : diff -r f98e0eb03af9 https://dvyukov%40google.com@code.google.com/p/go/ #Patch Set 3 : diff -r d7db8c804ffa https://dvyukov%40google.com@code.google.com/p/go/ #Patch Set 4 : diff -r d7db8c804ffa https://dvyukov%40google.com@code.google.com/p/go/ #Patch Set 5 : diff -r d7db8c804ffa https://dvyukov%40google.com@code.google.com/p/go/ #Patch Set 6 : diff -r d7db8c804ffa https://dvyukov%40google.com@code.google.com/p/go/ #Patch Set 7 : diff -r d7db8c804ffa https://dvyukov%40google.com@code.google.com/p/go/ #
Total comments: 6
Patch Set 8 : diff -r 3c7cac86a284 https://dvyukov%40google.com@code.google.com/p/go/ #
Total comments: 3
Patch Set 9 : diff -r 7064d3304d65 https://dvyukov%40google.com@code.google.com/p/go/ #
Total comments: 2
Patch Set 10 : diff -r ebf9b6a68289 https://dvyukov%40google.com@code.google.com/p/go/ #
MessagesTotal messages: 18
|