damccorm commented on code in PR #41240:
URL: https://github.com/apache/beam/pull/41240#discussion_r4682060124


##########
sdks/python/apache_beam/coders/coder_impl.pxd:
##########
@@ -276,6 +276,9 @@ cdef class LengthPrefixCoderImpl(StreamCoderImpl):
   cdef CoderImpl _value_coder
 
 
+cdef TimestampCoderImpl _TIMESTAMP_CODER_IMPL

Review Comment:
   Keeping `_TIMESTAMP_ENCODED_SIZE` as a module-level Python `int` avoids an 
extra `.pxd` declaration and avoids boxing a C `int` back into a Python `int` 
when adding to `self._window_coder_impl.estimate_size(...)` in 
`TimestampPrefixingWindowCoderImpl` (which is a Python class whose 
`estimate_size` returns a Python `int`).



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