Would using a library like Hyperscan improve Go's regex performance?
Reference: https://www.hyperscan.io/
Reference: https://www.hyperscan.io/
Hyperscan is often used in situations where you have many patterns that you want to test against the same string/byte sequence, e.g. in malware signature detection.
I thought about writing a Hyperscan-alike Regex library in Golang, just not sure how well that would perform with the dynamic memory allocation. I think if you could ensure to do allocations only once during initialization it should be pretty fast. I once built parser generators in Golang and I remember it was a bit painful optimizing them due to dynamic memory allocation, I think for such low-level stuff C or C++ is still better (though I was not very well versed in Golang at the time, so maybe that was on me).