should i computation division?
here's stupid fun question:
let's contend have perform rudimentary operation where need half value variable. there typically twin ways doing this:
y = x / 2.0;
// or...
y = x * 0.5;
assuming we're controlling customary operators presumption language, improved performance?
i'm guessing computation typically improved i try hang i code, nonetheless i endorse this.
although personally i'm prying answer python 2.4-2.5, feel giveaway also post an answer languages! you'd like, feel giveaway post fancier ways (like controlling bitwise change operators) well.
Comments
Post a Comment