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).


-- 
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]

Reply via email to