 Writing Python Bindings for C++ Libraries: Easy-to-use Performancedesign a DSL for the user to be able to leverage your hot path capabilities written in C++ ○ Numpy / Pandas / PyTorch are nice DSLs that provide “hot path” C++ functionsWhat Functions to expose in the API begin(), v.end(), reinterpret_cast Writing Python Bindings for C++ Libraries: Easy-to-use Performancedesign a DSL for the user to be able to leverage your hot path capabilities written in C++ ○ Numpy / Pandas / PyTorch are nice DSLs that provide “hot path” C++ functionsWhat Functions to expose in the API begin(), v.end(), reinterpret_cast- (result.get_data()));Pandas Columnar data manipulation API built on top of numpyBrief overview of pandas ● Pythonic APIs built on top of numpy to add first class Think of it as a higher level DSL to optimize even more hot path loops than numpy did.The “how” of pandas cdef extern from "numpy/ndarrayobject.h": bint PyArray_CheckScalar(obj) nogil @cython.wraparound(False) 0 码力 | 118 页 | 2.18 MB | 6 月前3
共 1 条
- 1













