k3s/pkg/conversion
Clayton Coleman 236925be87
Avoid allocations and a reflect.Call in conversion
reflect.Call is fairly expensive, performing 8 allocations and having to
set up a call stack. Using a fairly straightforward to generate switch
statement, we can bypass that early in conversion (as long as the
function takes responsibility for invocation). We may also be able to
avoid an allocation for the conversion scope, but not positive yet.

```
benchmark                    old ns/op     new ns/op     delta
BenchmarkPodConversion-8     14713         12173         -17.26%

benchmark                    old allocs     new allocs     delta
BenchmarkPodConversion-8     80             72             -10.00%

benchmark                    old bytes     new bytes     delta
BenchmarkPodConversion-8     9133          8712          -4.61%
```
2016-04-26 16:42:12 -04:00
..
queryparams Fix sinceTime pod log options 2016-02-25 00:46:13 -05:00
OWNERS Move blunderbuss assignees into tree 2016-03-02 20:46:32 -05:00
cloner.go Properly handle nil interfaces in DeepCopy. 2015-08-11 17:59:32 -07:00
converter.go Avoid allocations and a reflect.Call in conversion 2016-04-26 16:42:12 -04:00
converter_test.go Refactor diff into sub pkg 2016-03-21 20:21:39 +08:00
deep_copy_generated.go Avoid allocations and a reflect.Call in conversion 2016-04-26 16:42:12 -04:00
deep_copy_test.go Use generated DeepCopy methods. 2015-05-28 09:03:27 +02:00
deep_equal.go rewrite go imports 2015-08-05 17:30:03 -07:00
doc.go Remove codec awareness from conversion 2016-01-21 23:18:32 -05:00
helper.go Remove codec awareness from conversion 2016-01-21 23:18:32 -05:00
helper_test.go Remove codec awareness from conversion 2016-01-21 23:18:32 -05:00