3 ms·
Speaking of fast: https://redman.xyz/git/turbowc/tree/turbowc.c https://redman.xyz/git/turbowc/tree/turbowc.c seems to be really fast (it is not a replacement f
by johnisgood 2y ago
Speaking of fast: https://redman.xyz/git/turbowc/tree/turbowc.c https://redman.xyz/git/turbowc/tree/turbowc.c seems to be really fast (it is not a replacement for wc, however).
- stabbles 2y agoAVX2 is pretty much ubiquitous, the implementation above is only SSE2. I wrote a blog post with the main AVX2 tricks [1] which includes how to deal with repeated white space when counting words [1] https://stoppels.ch/2022/11/30/io-is-no-longer-the-bottleneck-part-2.html https://stoppels.ch/2022/11/30/io-is-no-longer-the-bottlenec...
- codedokode 2y agoIt seems to use hand-written code for SIMD. Cannot one use normal C code using loops so that compiler optimizes it into SIMD? I know that gcc can convert some loops into SIMD code.
- adgjlsfhk1 2y agoautovectorizers are surprisingly bad