Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
smarnach
on July 7, 2023
|
parent
|
context
|
favorite
| on:
{n} times faster than C
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
on July 7, 2023
[–]
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.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: