3 ms·
These days, compilers have gotten so damn smart with their optimizations that using assembly will actually make your code slower unless you really know what you
by Sohcahtoa82 5y ago
These days, compilers have gotten so damn smart with their optimizations that using assembly will actually make your code slower unless you really know what you're doing like the original post here.
A few years ago, I was doing Project Euler problems, and one of them had a solution that took about 45 minutes for my C program to solve. I decided that it was an incredibly simple problem, so rewrote it in Assembly.
My assembly solution took an hour to run.
I disassembled my C solution, and couldn't figure out what it was actually doing, though my assembly knowledge is pretty weak.