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:
Cost of system calls: what makes them expensive?
Read vs mmap: Which one is better for reading files?
Cost of parsing floats
Deciding the number of threads when going for multithreading
Cost of lock contention and shared data between threads
When to roll out your own custom data structures instead of the ones provided by your language
SWAR (SIMD within a register)
Branch free number parsing
Optimizing for common case
Loop unrolling
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: