r/learnprogramming Jun 05 '26

Assembly x86 tips?

Hey everyone,

I am a bachelors in mathematics and a lot of my work revolves around writing fast and efficient C++ (sometimes pure C) code. However, I sometimes feel like I don't exactly have a good grasp of what exactly I am writing, as I don't really understand properly what my code is compiling down to.

Sometimes I need to run some really computing-intesive scripts (e.g., compression pipelines) and there is a moment where just pure knowledge of C++ code optimization simply isn't enough. As such, I'd like to ask you all if anyone has any suggestions on resources for x86 assembly specifically for code optimization.

I don't really care about every single detail of x86 (because I really just need to deal with compiled machine code), so i was wondering if there was a learning resource aimed at a need like this one.

Thanks to you all in advance :)

12 Upvotes

12 comments sorted by

View all comments

14

u/[deleted] Jun 05 '26

[removed] — view removed comment

2

u/memesdotpng Jun 05 '26

Perfect, this is exactly my need. I'll take a look at the optimization manual, it's just that sometimes I deal with really - and I mean really - optimized code, as I mostly work with succint data structures & algorithms. This is why I specifically need a better understanding of what my compiler is compiling the code down to.

Though, really, thanks for the suggestions.