3 ms·
Got stung by this testing out of idle curiousity whether strncmp or memcmp was faster the other day.
by eliasmacpherson 13y ago
Got stung by this testing out of idle curiousity whether strncmp or memcmp was faster the other day.
- deletes 13y agoSo memcmp was faster, right?
- eliasmacpherson 13y agoDidn't finish the job, realised code was optimised out by O3 and left it at that. Unoptimised strncmp was beating unoptimised memcmp, it was taking 1.900s to finish where memcmp was taking 2.178s over many iterations.