penguin-wwy commented on issue #1887:
URL: https://github.com/apache/fury/issues/1887#issuecomment-2416638808

   My suggestion is to use [pybind11](https://github.com/pybind/pybind11) or 
directly write a [C-API](https://docs.python.org/3/c-api/index.html) to call 
the cpp `fury::Buffer`. The current Cython-generated C++ code still calls the 
`fury::Buffer`, which I think is unnecessary.
   
   ```cpp
   static CYTHON_INLINE int64_t __pyx_f_6pyfury_5_util_6Buffer_get_int64(struct 
__pyx_obj_6pyfury_5_util_Buffer *__pyx_v_self, uint32_t __pyx_v_offset, 
CYTHON_UNUSED int __pyx_skip_dispatch) {
     ...
   
     /* "pyfury/_util.pyx":140
    *     cpdef inline int64_t get_int64(self, uint32_t offset):
    *         self.check_bound(offset, <int32_t>8)
    *         return self.c_buffer.get().GetInt64(offset)             # 
<<<<<<<<<<<<<<
    * 
    *     cpdef inline float get_float(self, uint32_t offset):
    */
     __pyx_r = __pyx_v_self->c_buffer.get()->GetInt64(__pyx_v_offset);
     goto __pyx_L0;
   
     /* function exit code */
     ...
   }
   ```


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to