News for hackers. Stuff that matters.
Re:Six times faster than C by smarnach on Friday July 07, 2023 @02:52AM (#36628151)
This makes the assumption that the only characters in the string are "s" and "p". There is no basis for this assumption. I think this code solves a different problem rather than being an optimisation of the original code.
Re:Six times faster than C by utopcell on Friday July 07, 2023 @11:01AM (#36632768)
The string can only contain 's' or 'p' if you examine how it is constructed in bench.c, and taking that into consideration yields another ~2x speedup.