OlivierBinette / StringCompare

Efficient String Comparison Functions and Fuzzy String Matching
https://olivierbinette.github.io/StringCompare/
17 stars 2 forks source link

Change C++ handling of lists from stl to buffer protocol #11

Open OlivierBinette opened 2 years ago

OlivierBinette commented 2 years ago

Currently, every list passed to a StringCompare function is copied before operations are applied. This is due to the use of stl containers as input types and implicit conversions done by pybind11 (see https://pybind11.readthedocs.io/en/stable/advanced/cast/stl.html).

It would be best to have StringCompare vectorized functions take buffer protocol objects as arguments, to avoid any copying and improve efficiency.

OlivierBinette commented 2 years ago

Need to balance performance with maintainability, extensibility and portability of the C++ library... Not sure what to do here.