[
https://issues.apache.org/jira/browse/BEAM-14347?focusedWorklogId=769897&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-769897
]
ASF GitHub Bot logged work on BEAM-14347:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 12/May/22 21:25
Start Date: 12/May/22 21:25
Worklog Time Spent: 10m
Work Description: lostluck commented on PR #17650:
URL: https://github.com/apache/beam/pull/17650#issuecomment-1125436509
> R: @lostluck here's the simple function registration you suggested.
Arguably we don't need it, but it was simple enough and gives us full
consistency
We do need it for the same reason. Please add a benchmark for wrapping and
invoking a simple function caller, and you'll see.
The stats combiners are simple binary functions eg [for
minIntFn](https://github.com/apache/beam/blob/243128a8fc52798e1b58b0cf1a271d95ee7aa241/sdks/go/pkg/beam/transforms/stats/min_switch.go#L56)
The current code generator [generates registrations for them
all](https://github.com/apache/beam/blob/master/sdks/go/pkg/beam/transforms/stats/stats.shims.go#L52)
and their [factory
wrappers](https://github.com/apache/beam/blob/master/sdks/go/pkg/beam/transforms/stats/stats.shims.go#L81)
specifically for the [caller
invoker](https://github.com/apache/beam/blob/master/sdks/go/pkg/beam/transforms/stats/stats.shims.go#L261).
The various struct wrappers happened 2nd originally, and piggy backed on the
work to make functions faster (partly because that was faster than an
alternative method receiver passing approach).
Issue Time Tracking
-------------------
Worklog Id: (was: 769897)
Time Spent: 20h (was: 19h 50m)
> [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: 20h
> 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)