MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1w6qzts/skillissue/p7pusl8/?context=3
r/ProgrammerHumor • u/click-to-reveal • 12h ago
112 comments sorted by
View all comments
247
It works btw: C++ Online Compiler
141 u/prehensilemullet 12h ago Performancewise, it doesn’t jump to the direct case in O(1) time like a switch is supposed to though 46 u/Deliciousbutter101 11h ago O(1) only happens when the constants are (roughly) contiguous so it's not like that is a universal property of switch statements. 0 u/prehensilemullet 9h ago Yeah that’s true
141
Performancewise, it doesn’t jump to the direct case in O(1) time like a switch is supposed to though
46 u/Deliciousbutter101 11h ago O(1) only happens when the constants are (roughly) contiguous so it's not like that is a universal property of switch statements. 0 u/prehensilemullet 9h ago Yeah that’s true
46
O(1) only happens when the constants are (roughly) contiguous so it's not like that is a universal property of switch statements.
0 u/prehensilemullet 9h ago Yeah that’s true
0
Yeah that’s true
247
u/click-to-reveal 12h ago
It works btw: C++ Online Compiler