robertwb commented on code in PR #23192:
URL: https://github.com/apache/beam/pull/23192#discussion_r971353162
##########
sdks/python/apache_beam/coders/stream.pyx:
##########
@@ -59,6 +59,12 @@ cdef class OutputStream(object):
cpdef write_var_int64(self, libc.stdint.int64_t signed_v):
"""Encode a long using variable-length encoding to a stream."""
cdef libc.stdint.uint64_t v = signed_v
+ # Inline common case.
+ if v <= 0x7F and self.pos < self.buffer_size - 1:
Review Comment:
<= is correct, fixed above as well.
--
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]