SAS7BDAT parser: Speed up RLE/RDC decompression by jonashaag · Pull Request #47405 · pandas-dev/pandas (original) (raw)
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea would be to have a signature that looks like this:
cdef inline uint8_t buf_get(Buffer buf, size_t offset, int *error):
Then within the function do something like:
if something_bad_happened: *error = 1
At least in C. I'm not as familiar with Cython semantics to know how that works. The caller passes error as an argument by address (&error
) and then check after the call if it was set to 1 or not
This is just a generic approach; if it matters or not in your current design comes back to whether or not a sentinel can safely be reserved or not