Skip to main content
Peter Cordes's user avatar
Peter Cordes's user avatar
Peter Cordes's user avatar
Peter Cordes
  • Member for 15 years, 5 months
  • Last seen this week
2143 votes
Accepted

Why does C++ code for testing the Collatz conjecture run faster than hand-written assembly?

433 votes
Accepted

Deoptimizing a program for the pipeline in Intel Sandybridge-family CPUs

382 votes

How much of ‘What Every Programmer Should Know About Memory’ is still valid?

334 votes
Accepted

What is the best way to set a register to zero in x86 assembly: xor, mov or and?

326 votes
Accepted

Does the C++ standard allow for an uninitialized bool to crash a program?

272 votes
Accepted

Is incrementing an int effectively atomic in specific cases?

185 votes

Why does glibc's strlen need to be so complicated to run quickly?

176 votes
Accepted

Bubble sort slower with -O3 than -O2 with GCC

161 votes
Accepted

Fastest way to do horizontal SSE vector sum (or other reduction)

156 votes
Accepted

How to remove "noise" from GCC/clang assembly output?

129 votes
Accepted

Why does this delay-loop start to run faster after several iterations with no sleep?

112 votes
Accepted

Where is the x86-64 System V ABI documented?

104 votes
Accepted

Possible GCC bug when returning struct from a function

93 votes
Accepted

INC instruction vs ADD 1: Does it matter?

82 votes
Accepted

Why is integer assignment on a naturally aligned variable atomic on x86?

81 votes
Accepted

What happens if you use the 32-bit int 0x80 Linux ABI in 64-bit code?

79 votes

Where is the lock for a std::atomic?

79 votes
Accepted

Is there a 128 bit integer in gcc?

79 votes
Accepted

Argument order to std::min changes compiler output for floating-point

78 votes

How to get the CPU cycle count in x86_64 from C++?

78 votes

Floating point division vs floating point multiplication

75 votes
Accepted

Why are loops always compiled into "do...while" style (tail jump)?

73 votes
Accepted

Boolean values as 8 bit in compilers. Are operations on them inefficient?

73 votes
Accepted

gcc optimization flag -O3 makes code slower than -O2

73 votes

32-bit absolute addresses no longer allowed in x86-64 Linux?

73 votes
Accepted

Can x86's MOV really be "free"? Why can't I reproduce this at all?

73 votes
Accepted

Why do none of the major compilers optimize this conditional store that checks if the value is already set?

70 votes

Why is this seemingly slower C loop actually twice as fast as the other way?

67 votes
Accepted

What is callq instruction?

67 votes

Why does Windows64 use a different calling convention from all other OSes on x86-64?

1
2 3 4 5
223