News for hackers. Stuff that matters.
Re:The Boyer-Moore Fast String Searching Algorithm by burntsushi on Friday April 23, 2021 @05:25PM (#26919372)
For line counting specifically, memchr isn't used, but rather, bytecount is: https://docs.rs/bytecount/0.6.2/bytecount/

However, memchr is still used for finding the bounds of a line when a match occurs. memchr still does pretty well on shorter haystacks too. The main loop is indeed quite large, but before that, it does unaligned loads of 32 bytes: https://github.com/BurntSushi/rust-memchr/blob/427fdc384007d...

There are no comments on this comment yet.