RSSAmplifier

Blog

Experimental chill

a random walk through Software Engineering

danlark.orgRSS feed ↗10 posts

Latest posts

“csinc”, the AArch64 instruction you didn’t know you wanted

After a long time of not publishing anything and being passive about doing any writing in this blog, I am coming back for however many articles I can. Today I want to talk about an underrated feature of AArch64 ISA which is often overlooked but used by compilers a lot. It s just a good Continue reading " csinc , the AArch64 instruction you didn t know you wanted"

Changing std::sort at Google’s Scale and Beyond

TL;DR; We are changing std::sort in LLVM s libcxx. That s a long story of what it took us to get there and all possible consequences, bugs you might encounter with examples from open source. We provide some benchmarks, perspective, why we did this in the first place and what it cost us with exciting ideas from Continue reading "Changing std::sort at Google s Scale and Beyond"

Beyond malloc efficiency to fleet efficiency: a hugepage-aware memory allocator

TCMalloc team recently published a paper on OSDI 21 about Google s allocator internals, specifically on how huge pages are used. You can read the full paper here. TL;DR. Google saved 2.4% of the memory fleet and increased the QPS performance of the most critical applications by 7.7%, an impressive result worth noting. Code is open sourced, Continue reading "Beyond malloc efficiency to fleet…

How a Bug(?) in the Linux CRC-32 Checksum Turned out not to be a Bug

A friend of mine nerd sniped me with a good story to investigate which kinda made me giggle and want to tell to the public some cool things happened to me during my experience with hashing and other stuff. The story is simple and complex at the same time, I d try to stick to a Continue reading "How a Bug(?) in the Linux CRC-32 Checksum Turned out not to be a Bug"

Miniselect: Practical and Generic Selection Algorithms

Today I present a big effort from my side to publish miniselect generic C++ library to support multiple selection and partial sorting algorithms. It is already used in ClickHouse with huge performance benefits. Exact benchmarks and results will be later in this post and now let s tell some stories about how it all arose. Continue reading "Miniselect: Practical and Generic Selection Algorithms"

I need extra C/C++ performance now. How?

Hello everyone, today we are going to talk about C++ performance. Again, another usual perf blog as you may think. I promise to give really practical advice and don t get bullshitty (okay, a little bit) talks about how C++ is performant. We are gonna roast the compilers and think about what we should do about Continue reading "I need extra C/C++ performance now. How?"

News Aggregator from Scratch in 2 Weeks

Data Clustering Contest was a two-week data science and engineering competition held by Telegram in May. The Telegram team wanted participants to build a simple yet effective news aggregator that consolidates thousands of articles from various publishers and websites into a single page, which shows the latest news in real time, exactly like Google News, Bing News or Continue reading "News…

Optimizing 128-bit Division

When it comes to hashing, sometimes 64 bit is not enough, for example, because of birthday paradox the hacker can iterate through random entities and it can be proven that with some constant probability they will find a collision, i.e. two different objects will have the same hash. is around 4 billion objects and Continue reading "Optimizing 128-bit Division"

Why is std::pair broken?

Today we are going to talk about C++ basic std::pair class in a way how and why it is broken. Story std::pair first appeared in C++98 as a pretty basic class with a very simple semantics you have two types T1 and T2, you can write std::pair T1, T2 and access .first and .second members Continue reading "Why is std::pair broken?"

How to crack HashCode competition with some engineering skills

Hi everyone, hashcode is over. As now I can tell anything, I want just to tell how I was solving this problem, my methodologies, overall the structure of the data sets. I am not going to provide any internals and whatsoever, all data can be checked and much of it is my personal opinion though Continue reading "How to crack HashCode competition with some engineering skills"