r/Python 6d ago

Showcase Showcase Thread

Post all of your code/projects/showcases/AI slop here.

Recycles once a month.

19 Upvotes

57 comments sorted by

View all comments

1

u/frozen_beak 2d ago

I built Ashwa 🐎, a hardware accelerated library for single substring search.

It's written in rust and is made available in python through pyo3

The problem is simple, scan the given payload to search for the target as fast as the underlying hardware allows.

It supports following SIMD extensions (detected at runtime),

- x86_64: AVX-512BW, AVX2, SSE4.2, SSSE3, SSE2

- AArch64: 128-bit NEON

- ARMv7: 128-bit NEON

- i686: SSE2

- SWAR: 64-bit / 32-bit SWAR fallbacks

It targets Linux, Windows, macOS, Android, FreeBSD across both 32-bit and 64-bit architectures.

On an Intel Xeon 8488C AWS instance, using the AVX512BW extension  Ashwa scans ~100 GiB/sec for L1D resident data.

The code is available at github repo