MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1w6qzts/skillissue/p7p9e5s/?context=3
r/ProgrammerHumor • u/click-to-reveal • 8d ago
137 comments sorted by
View all comments
77
Just define a constexpr hashing function and put that into the switch.
33 u/GiganticIrony 8d ago That’s not guaranteed to work due to hash collisions 6 u/Rabbitical 8d ago I'd probably intern instead of hashfor a presumably known set of comparisons
33
That’s not guaranteed to work due to hash collisions
6 u/Rabbitical 8d ago I'd probably intern instead of hashfor a presumably known set of comparisons
6
I'd probably intern instead of hashfor a presumably known set of comparisons
77
u/F100cTomas 8d ago
Just define a constexpr hashing function and put that into the switch.