Descriptionsync: add Cache component
The Cache caches interchangeable objects,
and helps to optimize garbage generation.
Benchmark results as compared to chan-based cache:
benchmark old ns/op new ns/op delta
BenchmarkCache 66 37 -44.14%
BenchmarkCache-2 336 18 -94.43%
BenchmarkCache-4 375 12 -96.56%
BenchmarkCache-8 390 8 -97.92%
BenchmarkCache-16 390 6 -98.25%
BenchmarkCache-32 392 4 -98.94%
BenchmarkCache-64 417 4 -99.00%
Patch Set 1 #Patch Set 2 : diff -r 81e554ab7787 https://dvyukov%40google.com@code.google.com/p/go/ #Patch Set 3 : diff -r 81e554ab7787 https://dvyukov%40google.com@code.google.com/p/go/ #Patch Set 4 : diff -r 81e554ab7787 https://dvyukov%40google.com@code.google.com/p/go/ #Patch Set 5 : diff -r 2879112bff3d https://dvyukov%40google.com@code.google.com/p/go/ #Patch Set 6 : diff -r 2879112bff3d https://dvyukov%40google.com@code.google.com/p/go/ #
|