Low Level Optimization

October 10, 2021

It’s my third week of Bradfield classes. We’re tackling a lot of assembly programming. Here are my unstructured notes, links and other various resources I’ve collected over the period of this week, mostly for my own reference, as I am Learning in Public.

So, how are things?

So, one thing no one tells you about learning assembly is how big the instruction sets are. I am kidding though. Everyone talks about it all the time. Anyway, having caught the bug I keep digging at asm, this week through this fabulous tutorial. The lectures are focusing on performance optimizations and cache - two fascinating topics. While I’m at it, it’s crcial to shout out Godbolt, a compiler explorer that is an absolutely incredible tool.

I’m in constant awe of how beneficial taking the course is so far. The ability to start reasoning about the computations my code is actually performing from first principles is an astonishing and exciting skill. I cannot stress enough how exciting it is to finally be able to ‘pop the hood’ and start answering the performance questions with some degree of authority and certainty.

I’d like to highlight an excellent blog post about what was important to learn throughout a career of a programmer. As I’m learning so much, I find it important to prioritize and navigate my interests in the areas that could give me the best ROI, engineering-wise. I want to focus on things that will enable me to become more effective at my work, and this blogpost (and other in the series) are hitting the nail on the head on that. Another very interesting (and very motivating) blogpost is one by Richard Artoul, From Coding Bootcamp Graduate to Building Distributed Databases.

Also, do you know about Cyber Chef? If not, now you do. It’s great.

Switching between theory and practice by Donald Knuth

If you find that you’re spending almost all your time on theory, start turning some attention to practical things; it will improve your theories. If you find that you’re spending almost all your time on practice, start turning some attention to theoretical things; it will improve your practice.

Optimization Lecture Notes

Links dump

Cache Lecture Notes

  • Lay your data down in a way you’ll use it.
  • 7-cpu.com/cpu/Skylake.html
  • bugs.ruby-lang.org/issues/12142

Shop talk

I’ve been working a little on using netrw better. I’m using vim as my main editor and I am honing basic fs tasks using netrw. Here are some links and notes that I’ve stumbled upon and found worthy:


That’s it! This week’s note is pretty unstructured and has literally no narrative. That’s OK though. Consistency is key.

Written by Daniel Kaczmarczyk, a software engineer and educator. you can find me on twitter or email me at daniel.kaczmarczyk@hey.com

a pale blue and yellow circle