MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programminghorror/comments/1w74nkf/skill_issue/p7ul0tv/
r/programminghorror • u/click-to-reveal • Sep 04 '26
63 comments sorted by
View all comments
Show parent comment
5
Isn't each y only evaluated once? The evaluation in the "else if (_s==y)"?
2 u/mapronV Sep 04 '26 only performance problem is not using sized comparison operator, due to decay of char[] to char*.so yeah, string_view advice is okay, but this is a joke code, it will not fly in production anyway. 2 u/LeeHide Sep 04 '26 each true one is only evaluated once, but every false one until then is also evaluated.
2
only performance problem is not using sized comparison operator, due to decay of char[] to char*.so yeah, string_view advice is okay, but this is a joke code, it will not fly in production anyway.
each true one is only evaluated once, but every false one until then is also evaluated.
View all comments
Show parent comment
5
u/GasolinePizza Sep 04 '26
Isn't each y only evaluated once? The evaluation in the "else if (_s==y)"?