lostluck commented on code in PR #17650:
URL: https://github.com/apache/beam/pull/17650#discussion_r871870086
##########
sdks/go/pkg/beam/register/register_test.go:
##########
@@ -818,25 +865,37 @@ func BenchmarkMethodCalls(b *testing.B) {
registration func()
}{
// No optimization performed at all
- {"MakeFunc_Unoptimized", func() { aFunc =
reflectx.MakeFunc(f.ProcessElement) }, func() { /*No op*/ }},
// Used in graph deserialization
- {"MakeFunc.Call_Unoptimized", func() { aFnCall =
aFunc.Call(funcIn)[0].(int) }, func() { /*No op*/ }},
// Used to call the function repeatedly
- {"MakeFunc.Call1x1_Unoptimized", func() { aFnCall =
aFunc1x1.Call1x1(CustomType{val: 4}).(int) }, func() { aFunc1x1 =
reflectx.ToFunc1x1(aFunc) }}, // Used to call the function repeatedly
- {"NewFn_Unoptimized", func() { aFn, _ = graph.NewFn(f) },
func() { /*No op*/ }},
// Used in graph construction (less valuable)
- {"EncodeMultiEdge_Unoptimized", func() { aME, _ =
graphx.EncodeMultiEdge(&me) }, func() { /*No op*/ }},
// Used in graph serialization at execution time
+ {"MakeFunc_Unoptimized", func() { aFunc =
reflectx.MakeFunc(f.ProcessElement) }, func() { /*No op*/ }},
//
Used in graph deserialization
+ {"MakeFunc.Call_Unoptimized", func() { aFnCall =
aFunc.Call(funcIn)[0].(int) }, func() { /*No op*/ }},
// Used to
call the function repeatedly
+ {"MakeFunc.Call1x1_Unoptimized", func() { aFnCall =
aFunc1x1.Call1x1(CustomType{val: 4}).(int) }, func() { aFunc1x1 =
reflectx.ToFunc1x1(aFunc) }},
// Used to call the function repeatedly
+ {"NewFn_Unoptimized", func() { aFn, _ = graph.NewFn(f) },
func() { /*No op*/ }},
// Used in graph
construction (less valuable)
+ {"EncodeMultiEdge_Unoptimized", func() { aME, _ =
graphx.EncodeMultiEdge(&me) }, func() { /*No op*/ }},
// Used in
graph serialization at execution time
+ {"MakeFunc_FunctionalDoFn_Unoptimized", func() { aFunc =
reflectx.MakeFunc(addCustomType2) }, func() { /*No op*/ }},
// Used in graph
deserialization
+ {"MakeFunc_FunctionalDoFn.Call_Unoptimized", func() { aFnCall2
= aFunc.Call(funcIn2)[0].(CustomType2) }, func() { /*No op*/ }},
// Used to call the
function repeatedly
+ {"MakeFunc_FunctionalDoFn.Call1x1_Unoptimized", func() {
aFnCall2 = aFunc2x1.Call2x1(CustomType2{val2: 4}, CustomType2{val2:
3}).(CustomType2) }, func() { aFunc2x1 = reflectx.ToFunc2x1(aFunc) }}, // Used
to call the function repeatedly
Review Comment:
Typo: 2x1 here and below
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]