Is bitwise operations a good habit?

Source: Internet
Author: User

Thinking about this problem comes from a question post https://class.coursera.org/hwswinterface-002/forum/thread in the course of "software and hardware interface" on Coursera? Thread_id = 854

The author found two links: They all provided various bitwise operation methods to speed up the code.

Https://graphics.stanford.edu /~ Seander/bithacks.html

Http://lab.polygonal.de /? P = 81

I think the most fundamental reason for the bit operation is to speed up the program. However, with a powerful compiler, the device's computing power is becoming more and more powerful, so the speed benefits of General programs using bit operations should not be too obvious.

So, just as you get used to it.

However, it is indeed an advantage to be proficient in BIT operations ~

Is bitwise operations a good habit?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.