Comment by azhenley
Now if I can just use SIMD directly from Python without calling out to another language.
Now if I can just use SIMD directly from Python without calling out to another language.
why would you want to? if you are performance bound with Python code, you can pick up a 20-50x performance improvement by switching language.
Right, but if there's only a small portion of my code that does string search and it's a hot path, it would still be much much much more convenient to access SIMD-based string search code direct from Python rather than writing the code (LLM or not) in another language and then construct bindings (LLM or not).
Try Nim. It's pretty easy to get the hang of it for simple things, and you can make a python module too.
Hi Austin! Was just checking your blog and the vowels detection post (< https://austinhenley.com/blog/vowels.html>).
What exactly do you mean by “use SIMD directly without calling out to another language”?
In some way Assembly will probably anyways be another language… but that’s a technicality.
I guess the spectrum of SIMD-related work in relation to Python is quite broad. There are projects like PeachPy, to help one write x86 Asm in Python, new Python’esque languages like Mojo, or SIMD libraries with thin CPython bindings. Do you mean one of those?
PS: I’m in the last camp. And in case you are focused on ASCII, for vowel search, have you tried StringZilla’s `find_first_of` (< https://github.com/ashvardanian/StringZilla/blob/960967d78c7...>)? I think it should perform well ;)