VectorCamp / vectorscan

A portable fork of the high-performance regular expression matching library
https://www.vectorcamp.gr/project/vectorscan/
Other
495 stars 53 forks source link

Python Bindings #205

Open ynouri opened 9 months ago

ynouri commented 9 months ago

Hi Vectorscan maintainers,

Thanks for your incredible work on this project!

We are currently using Hyperscan in production on AWS Intel instances and are interested in migrating to Vectorscan to reduce our compute costs.

We currently leverage the Python bindings available on this repo: https://github.com/darvid/python-hyperscan

Curious if anyone in the Vectorscan community has already given a stab at a python-vectorscan package? Or even some crude manual attempt we could refer to?

Note: Vectorscan has been discussed on the python-hyperscan repo, see this issue: https://github.com/darvid/python-hyperscan/issues/42#issue-1313348145. It doesn't look like there is an immediate plan to support it.

Thank you!

markos commented 9 months ago

Hello @ynouri !

Thank you for your kind words! We don't currently have plans to do a python-vectorscan port, as there is nothing (yet) specific to vectorscan, we are currently ABI and API compatible with hyperscan. So if someone is using python-hyperscan and would like to switch to vectorscan the only thing necessary is to replace the libraries. Possibly that would only require the python requirements definitions to be changed. In the future however, we will definitely provide extensions specific to vectorscan -due to no fault of ours, there is a license change and we have to respect that.

markos commented 9 months ago

What I mean is that you can switch to AWS Graviton CPUs right now! It should not require any serious change at this point in python-hyperscan, if you however do find an issue, feel free to give us feedback so that we can look into it :)

ynouri commented 8 months ago

Thanks for your quick reply @markos !

Just wanted to drop a note here that https://github.com/darvid/python-hyperscan does not seem to exist anymore (the entire Github user seems to have been deleted/renamed). Not sure what happened

ynouri commented 8 months ago

Side note: we've been able to successfully build python-hyperscan wheels against the Vectorscan library on ARM hardware (Amazon EC2 m7g instance with a Graviton3 CPU). It was mostly drop-in like you mentioned!

Our next step is to benchmark Hyperscan on Intel VS Vectorscan on ARM on our specific use case.