Syndicate content

optimization

C++ automatic optimizations

Once in a while I check how the compilers are behaving in such and such situations to make sure that when I wrote code it gets properly optimized. Today I was surprised as I tried to put a break point of a variable and it looked like the compiler wasn't using it. Indeed, the optimizer 100% removed the variable from the final code. Quite interesting since trying to reverse engineer this assembly language would probably end up using a goto statement... (ouch!)

The code goes more or less like this:

[toc hidden:1]
Syndicate content Syndicate content

     

Terms of Site Index

Find the page/content you are looking for with our index.

  • download
  • Fiesty

    Name of a Walt Disney character used for a version of Ubuntu.

  • lock

    A lock is used to limit the use of shared resources in different ways. When only using the data in read mode, the lock will prevent modifications, but any number of threads and processes can access the data. When in write mode, then only the owner can access the data.

  • macro
  • not

    In programming there are two not operators. One is the logical not that transforms TRUE into FALSE and vice versa. The other transforms bits from 0 to 1 and vice versa. not is also used in documentation with a very specific meaning. Often, the accompagnying verb defines the meaning with more details (i.e. MUST NOT and SHOULD NOT.)