Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

Bitwise operators performance


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 lomateron   Members   -  Reputation: 197

Like
0Likes
Like

Posted 22 November 2012 - 06:20 AM

In HLSL I can write a multiplication,addition,etc in terms of bitwise operations.
What is faster?



Ad:

#2 Hodgman   Moderators   -  Reputation: 13506

Like
0Likes
Like

Posted 22 November 2012 - 06:32 AM

The compiler knows that integer * 2 == integer << 2. If one is faster than the other, the compiler can/will substitute.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS