k3s/pkg/runtime
k8s-merge-robot c0b788bf49 Merge pull request #24727 from smarterclayton/fast_path_lookup
Automatic merge from submit-queue

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%
```

@wojtek-t related to #20309
2016-05-06 07:10:18 -07:00
..
serializer Split the storage and negotiation parts of Codecs 2016-05-05 12:08:23 -04:00
OWNERS Set runtime OWNERS 2016-03-04 23:59:34 -05:00
codec.go Split the storage and negotiation parts of Codecs 2016-05-05 12:08:23 -04:00
codec_check.go
conversion.go Small improvements in conversion generator 2016-04-05 02:10:23 +02:00
conversion_test.go
deep_copy_generated.go Split the storage and negotiation parts of Codecs 2016-05-05 12:08:23 -04:00
doc.go
embedded.go Vet fixes, mostly pass lock by value errors. 2016-04-06 11:27:40 -07:00
embedded_test.go Refactor diff into sub pkg 2016-03-21 20:21:39 +08:00
error.go
extension.go Rename RawJSON to Raw in runtime.RawExtension and add ContentType & ContentEncoding. 2016-03-18 12:35:27 +01:00
extension_test.go Rename RawJSON to Raw in runtime.RawExtension and add ContentType & ContentEncoding. 2016-03-18 12:35:27 +01:00
generated.pb.go Strip side-effect imports from generated protobuf 2016-05-02 18:12:20 -04:00
generated.proto Initial protobuf generated files 2016-04-20 12:13:05 -04:00
helper.go Support Close() in streaming decoder 2016-04-28 09:46:33 +02:00
helper_test.go Redo Unstructured to have accessor methods 2016-05-03 14:07:28 -07:00
interfaces.go Split the storage and negotiation parts of Codecs 2016-05-05 12:08:23 -04:00
register.go Redo Unstructured to have accessor methods 2016-05-03 14:07:28 -07:00
scheme.go Avoid allocations and a reflect.Call in conversion 2016-04-26 16:42:12 -04:00
scheme_test.go Fixing several (but not all) go vet errors. Most are around string formatting, or unreachable code. 2016-03-22 17:26:50 -07:00
swagger_doc_generator.go Remove old conversion generator 2016-04-15 12:07:57 +02:00
swagger_doc_generator_test.go
types.go Redo Unstructured to have accessor methods 2016-05-03 14:07:28 -07:00
types_proto.go Strip the proto build guard 2016-04-20 12:12:29 -04:00
unstructured.go Redo Unstructured to have accessor methods 2016-05-03 14:07:28 -07:00
unstructured_test.go Redo Unstructured to have accessor methods 2016-05-03 14:07:28 -07:00
unversioned_test.go