Playback speed
undefinedx
Share post
Share post at current time
0:00
/
0:00
Preview

Recording: Live Session on Performance Optimization using 1BRC as a Case Study

This Saturday we had our 2nd live session, the topic was centred around performance engineering using 1BRC as a case study. This session was much more interactive and lead by a lot of questions which drove it in interesting directions. We covered following topics:

  1. Cost of system calls: what makes them expensive?

  2. Read vs mmap: Which one is better for reading files?

  3. Cost of parsing floats

  4. Deciding the number of threads when going for multithreading

  5. Cost of lock contention and shared data between threads

  6. When to roll out your own custom data structures instead of the ones provided by your language

  7. SWAR (SIMD within a register)

  8. Branch free number parsing

  9. Optimizing for common case

  10. Loop unrolling

  11. Work stealing


What Went Well?

I’m quite happy with the way this session went. It was interactive and detailed.

The session was for 2 hours and we covered the first half of this list in quite a bit of detail including a ton of Q&A in between the topics. So, I am sure you will find a ton of value in there.

Unfortunately, we did not have a lot of time left to cover the more advanced topics so I had to rush through them. Sorry about that. In future, I would most probably split it into a 2-part session.

What’s Next?

I’m yet to come up with a new topic idea. But I will announce something soon. It takes considerable effort to prepare these.

However, if you are interested in this topic — I am happy to do it again. It will be a 2-part session this time so that we can give proper attention to all the topics. I think attending these live has much more value than watching the recording because you have the opportunity to ask questions and drive the discussion in different directions. So if you are interested let me know:

Loading...

This post is for paid subscribers

Confessions of a Code Addict
Confessions of a Code Addict Podcast
Deep dives into varied topics on Computer Science including compilers, programming languages, database internals, AI and more. Subscribe for insights and advance your engineering skills!