Jump to content

View more

Image of the Day

Boxes as reward for our ranking mode. ヾ(☆▽☆)
#indiedev #gamedev #gameart #screenshotsaturday https://t.co/ALF1InmM7K
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Bitwise operators performance

4: Adsense

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   

491
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?



#2 Hodgman   Moderators   

50607
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.