2 ms·
For so small strings, the overhead will dominate. In particular the time to CALL and RETurn from the function. Haskell actually has an advantage there because i
by bjourne 9y ago
For so small strings, the overhead will dominate. In particular the time to CALL and RETurn from the function. Haskell actually has an advantage there because it can use tail call optimization, obviating the need for CALL/RET, which a C function compiled in isolation can't.
Which is why you should always use the C99 "inline" keyword for performance sensitive functions.