I was reading another question pertaining the efficiency of two lines of code, and the OP said that he looked
How can I see the assembly code for a C++ program? What are the popular tools to do this?
In general, for int num, num++ (or ++num), as a read-modify-write operation, is not atomic. But I often see co
I tried to compare the performance of inline assembly language and C++ code, so I wrote a function that add tw
I've been contemplating how to protect my C/C++ code from disassembly and reverse engineering. Normally
How can the theoretical peak performance of 4 floating point operations (double precision) per cycle be achiev
I wrote these two solutions for Project Euler Q14, in assembly and in C++. They implement identical brute forc
I was looking for the fastest way to popcount large arrays of data. I encountered a very weird effect: Changin
Is if (a < 901) faster than if (a <= 900)? Not exactly as in this simple example, but there are slight p
Is there a faster way than x >= start && x <= end in C or C++ to test if an integer is between t
I want a function that returns -1 for negative numbers and +1 for positive numbers. http://en.wikipedia.org/wi
I have a C++ application, running on Linux, which I'm in the process of optimizing. How can I pinpoint wh
I am Integrating Matlab, C and Cuda together in a project. I used Matlab mix in order to connect matlab mx fun
I read in a few articles that raw pointers should almost never be used. Instead they should always be wrapped
Why is std::map implemented as a red-black tree? There are several balanced binary search trees (BSTs) out th
Why does the C++ STL not provide any "tree" containers, and what's the best thing to use instead? I want
Here is a piece of C++ code that shows some very peculiar behavior. For some strange reason, sorting the data