Tag: x86

65 votes
4 answers
2.3K views
How to run a program without an operating system?

How do you run a program all by itself without an operating system running? Can you create assembly programs t

avatar
Georgie
0 1 0 9
asked 07 September, 2021
52 votes
4 answers
663 views
How do I achieve the theoretical maximum of 4 FLOPs per cycle?

How can the theoretical peak performance of 4 floating point operations (double precision) per cycle be achiev

avatar
Dorian
0 1 0 9
asked 07 September, 2021
64 votes
17 answers
1.5K views
What's the purpose of the LEA instruction?

For me, it just seems like a funky MOV. What's its purpose and when should I use it?

avatar
Vi
0 1 0 9
asked 07 September, 2021
58 votes
11 answers
1.9K views
Why does C++ code for testing the Collatz conjecture run faster than hand-written assembly?

I wrote these two solutions for Project Euler Q14, in assembly and in C++. They implement identical brute forc

avatar
Deedee
0 1 0 9
asked 07 September, 2021
64 votes
11 answers
1.9K views
Replacing a 32-bit loop counter with 64-bit introduces crazy performance deviations with _mm_popcnt_u64 on Intel CPUs

I was looking for the fastest way to popcount large arrays of data. I encountered a very weird effect: Changin

avatar
Daniel
0 1 0 9
asked 07 September, 2021
57 votes
1 answers
2K views
fast multiplication of int8 arrays by constants

I wonder if there is a fast way of multiplying int8 arrays, i.e. for(i = 0; i < n; ++i) z[i] = x * y[i]

avatar
Lashawna
0 1 0 9
asked 07 September, 2021