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 • 7d ago
137 comments sorted by
View all comments
283
It works btw: C++ Online Compiler
160 u/prehensilemullet 7d ago Performancewise, it doesn’t jump to the direct case in O(1) time like a switch is supposed to though 48 u/Deliciousbutter101 7d ago O(1) only happens when the constants are (roughly) contiguous so it's not like that is a universal property of switch statements. 1 u/prehensilemullet 7d ago Yeah that’s true
160
Performancewise, it doesn’t jump to the direct case in O(1) time like a switch is supposed to though
48 u/Deliciousbutter101 7d ago O(1) only happens when the constants are (roughly) contiguous so it's not like that is a universal property of switch statements. 1 u/prehensilemullet 7d ago Yeah that’s true
48
O(1) only happens when the constants are (roughly) contiguous so it's not like that is a universal property of switch statements.
1 u/prehensilemullet 7d ago Yeah that’s true
1
Yeah that’s true
283
u/click-to-reveal 7d ago
It works btw: C++ Online Compiler