[ 
https://issues.apache.org/jira/browse/BEAM-14347?focusedWorklogId=769951&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-769951
 ]

ASF GitHub Bot logged work on BEAM-14347:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 12/May/22 23:01
            Start Date: 12/May/22 23:01
    Worklog Time Spent: 10m 
      Work Description: 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





Issue Time Tracking
-------------------

    Worklog Id:     (was: 769951)
    Time Spent: 21h 50m  (was: 21h 40m)

> [Go SDK] Allow users to optimize DoFns with a single generic registration 
> function
> ----------------------------------------------------------------------------------
>
>                 Key: BEAM-14347
>                 URL: https://issues.apache.org/jira/browse/BEAM-14347
>             Project: Beam
>          Issue Type: New Feature
>          Components: sdk-go
>            Reporter: Danny McCormick
>            Assignee: Danny McCormick
>            Priority: P2
>          Time Spent: 21h 50m
>  Remaining Estimate: 0h
>
> Right now, to optimize DoFn execution, users have to use the code generator. 
> This updates to allow them to use generics instead.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to