This code is heavily used in my crate (more than 55% of the time is used in this two functions, according to cargo flamegraph)
The function is basically :
For every row & columns :
- Check if we have [true, false, true, true, true, false, true]
- Check if we have 5 or more consecutive values (true x6 for example, or false x5)
It is really basic, and I've work a lot on it but I'm out of ideas, if you have some I'd gladly get help !
I'm not using Booleans and skipping some unwanted data (not everything is to be taken into account), but having new ideas on how to improve it further more would be very nice !
https://github.com/erwanvivien/fast_qr/blob/master/src/score.rs#L99-L191
You could see how I'm using it on Github