3 ms·
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 pr
by smarnach 3y ago
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.
- utopcell 3y agoThe 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.