News for hackers. Stuff that matters.
Re:Wc2: Investigates optimizing 'wc', the Unix word count pr... by ashvardanian on Thursday June 20, 2024 @11:56PM (#40746002)
In the context of State Machines and Automatas - Intel HyperScan might be a better reference point. But the idea is the same. With a trivial PoC using Python wrappers over SIMD libraries one can get a 3x boost over the native `wc` CLI on a modern CPU, memory-mapping a very average SSD: https://github.com/ashvardanian/StringZilla/tree/main/cli
Re:Wc2: Investigates optimizing 'wc', the Unix word count pr... by teo_zero on Saturday June 22, 2024 @03:11AM (#40757070)
Sorry, but your wc implementation does nothing to detect words, it just counts the spaces. Of course you don't need a state machine for that!