News for hackers. Stuff that matters.
Re:Regex Engine Internals as a Library by celeritascelery on Wednesday July 05, 2023 @03:19PM (#36605668)
My biggest wish for rust regex was support for ARM SIMD. Currently the literal optimization is only vectorized on x86. It seems that the author doesn’t own an ARM machine, and therefore can’t test implementation and so doesn’t want to support it.
Re:Regex Engine Internals as a Library by burntsushi on Wednesday July 05, 2023 @03:27PM (#36605811)
I actually have an M2 mac mini in the mail from Apple for exactly this purpose.

My time horizon is very long. It takes me a long time to do things these days.

It has never been true that I don't want to support it. Merely that it is difficult to verify and test if I can't do it myself. There is also the problem that the port from x86 to arm is not straight-forward, due to both my own ignorance and what I believe are important missing vector operations such as movemask.

This is discussed a bit more here (including the bit about movemask): https://github.com/BurntSushi/memchr/issues/76

Re:Regex Engine Internals as a Library by celeritascelery on Thursday July 06, 2023 @09:53AM (#36615769)
The current PR for ARM SIMD[1] uses a different instruction mix to achieve the same goals as movemask. I tested the PR and it has a significant speedup over the non-vectorized version.

[1]https://github.com/BurntSushi/memchr/pull/114

Re:Regex Engine Internals as a Library by burntsushi on Thursday July 06, 2023 @10:01AM (#36615896)
Yup, thanks for the reminder. That's my starting point once my M2 arrives.
Re:Regex Engine Internals as a Library by AceJohnny2 on Wednesday July 05, 2023 @03:39PM (#36605985)
> It seems that the author doesn’t own an ARM machine, and therefore can’t test implementation and so doesn’t want to support it.

Tangential (since he answered already), but in this era of cheap cloud instances, I'd be surprised if "not owning a <blank>" is any hindrance to support.

Re:Regex Engine Internals as a Library by cesarb on Wednesday July 05, 2023 @04:34PM (#36606727)
> but in this era of cheap cloud instances, I'd be surprised if "not owning a <blank>" is any hindrance to support.

When you own a device, it doesn't cost you more (other than electricity) if you take longer while playing with it, and there's no extra cost (other than space) to having it ready to be used when necessary. When you rent a cloud instance, there's a direct monetary cost for every extra minute you take while investigating an issue, and it's less guaranteed that it'll be available when you need it.

Or, to put it more simply: unless he has his own personal device to play with, he'll have to spend extra money for every issue he investigates and every change he makes to the ARM support.

Re:Regex Engine Internals as a Library by burntsushi on Wednesday July 05, 2023 @04:50PM (#36606895)
Yes, exactly. There is a ton of friction.