what is the performance impact of using int64_t instead of int32_t on 32-bit systems?

which factors influence performance of these operations? Probably the compiler and compiler version; but does the operating system or the CPU make/model influence this as well? Mostly the processor architecture (and model – please read model where I mention processor architecture in this section). The compiler may have some influence, but most compilers do pretty … Read more

What is the difference between a 32-bit and 64-bit processor?

All calculations take place in the registers. When you’re adding (or subtracting, or whatever) variables together in your code, they get loaded from memory into the registers (if they’re not already there, but while you can declare an infinite number of variables, the number of registers is limited). So, having larger registers allows you to … Read more

Is it advisable to switch from Cygwin 32bit to Cygwin 64bit?

Once upon a time, 64-bit Cygwin was missing many packages present in 32-bit Cygwin, but today the list of such packages is quite short. Since that was the last significant reason to create new 32-bit Cygwin installs on 64-bit Windows systems, it is unlikely that you have a good reason to do that today. The … Read more

The proper way of forcing a 32-bit compile using CMake

If you want to compile and link for 32 bit using cmake use this for creating libraries and binaries: Creating libraries: add_library(mylib SHARED my_source.c) set_target_properties(mylib PROPERTIES COMPILE_FLAGS “-m32” LINK_FLAGS “-m32”) creating executables: add_executable(mybin sources.c) set_target_properties(mybin PROPERTIES COMPILE_FLAGS “-m32” LINK_FLAGS “-m32”)

How should I prepare my 32-bit Delphi programs for an eventual 64-bit compiler? [duplicate]

First up, a disclaimer: although I work for Embarcadero. I can’t speak for my employer. What I’m about to write is based on my own opinion of how a hypothetical 64-bit Delphi should work, but there may or may not be competing opinions and other foreseen or unforeseen incompatibilities and events that cause alternative design … Read more

Fast computing of log2 for 64-bit integers

Intrinsic functions are really fast, but still are insufficient for a truly cross-platform, compiler-independent implementation of log2. So in case anyone is interested, here is the fastest, branch-free, CPU-abstract DeBruijn-like algorithm I’ve come to while researching the topic on my own. const int tab64[64] = { 63, 0, 58, 1, 59, 47, 53, 2, 60, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)