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

Popular posts from this blog

why does floated <input> control floated component slip over too distant right ie7, nonetheless firefox?

grails record upload problems

how i emanate permitted url asp.net mvc?