Hacker News new | ask | show | jobs
by mikeash 4254 days ago
A sufficiently smart compiler could optimize a string of strcat calls to remove the redundant length finding. I have no idea if real compilers actually would....
1 comments

Java does, for the "+" operator.
Oh yes, nice example! So there's precedent for C compilers doing something similar.