Dispatching by values is very slow - Feature or Problem?

that’s literally the only purpose it serves… (comparing 2 versions of function is same idea)

there’s really a ton of discussion on this, and the answer is yes, don’t use value as types but also don’t be afraid to write branch if you need to, sometimes constant folding gives you a ride:

3 Likes