
The Coding Nest Random distributions are not onesizefitsall (part 2)
Random distributions are not onesizefitsall (part 2)
Martin Hořeňovský codingnest.comIn this part, we will look at different algorithms for generating uniformly distributed random numbers and determine whether they fit specific use cases better than Lemire's algorithm.

The Coding Nest Random distributions are not onesizefitsall (part 1)
Random distributions are not onesizefitsall (part 1)
Martin Hořeňovský codingnest.comRecently I was again on CppCast, and again I talked about C++'s standard library support for random numbers. One of the things I said was that random distributions are not onesizefitsall. This post is about how this applies to Lemire's algorithm for generating uniformly distributed integers.

The Coding Nest The Little Things: The Missing Performance in std::vector
The Little Things: The Missing Performance in std::vector
Martin Hořeňovský codingnest.com`std::vector` is often said to be the default container, because it provides good baseline performance for common operations. Recently, I experimented with a simple API change that can improve the performance of a common usage pattern by 10+ %.

The Coding Nest Stop talking about Amdahl's law
Stop talking about Amdahl's law
Martin Hořeňovský codingnest.comWithout talking about Gustafson's law and the assumptions both make.

The Coding Nest The Little Things: Why you should always have benchmarks ready
The Little Things: Why you should always have benchmarks ready
Martin Hořeňovský codingnest.comAt the end of January, I removed some lowhanging allocations from Catch2. This meant that running the SelfTest binary in v3.3.1 made 8k fewer allocations, but it also made section tracking in v3.3.1 ~4x slower. This post is about how that happened and what we can learn from this.

The Coding Nest The Little Things: My ?radical? opinions about unit tests
The Little Things: My ?radical? opinions about unit tests
Martin Hořeňovský codingnest.comDue to maintaining Catch2 and generally caring about SW correctness, I spend _a lot_ of my time thinking about tests. This has left me with many opinions about tests, some conventional and some heterodox.

The Coding Nest NDC TechTown 2022: Trip Report
NDC TechTown 2022: Trip Report
Martin Hořeňovský codingnest.comLast week I was at NDC TechTown 2022, and I decided to write down my thoughts on the talks I saw (including the two talks given at the meetup before the conference) and other related things.

The Coding Nest The Little Things: Comparing Floating Point Numbers
The Little Things: Comparing Floating Point Numbers
Martin Hořeňovský codingnest.comThere is a lot of confusion about floatingpoint numbers and a lot of bad advice going around. IEEE754 floatingpoint numbers are a complex beast, and comparing them is not always easy, but in this post, we will take a look at different approaches and their tradeoffs.

The Coding Nest The Little Things: Testing with Catch2
The Little Things: Testing with Catch2
Martin Hořeňovský codingnest.comIn this post, we will take a look at testing with Catch2. First, we will go over the basics, and then we will take a closer look at three more advanced features: Matchers, Generators, and Benchmarking.

The Coding Nest The Little Things: Everyday efficiencies
The Little Things: Everyday efficiencies
Martin Hořeňovský codingnest.comPremature optimization is often said to be the root of all evil, because it makes future maintenance harder. I want to show some cases where the faster code is just (or more) as maintainable as the slower one.

The Coding Nest The Little Things: Speeding up C++ compilation
The Little Things: Speeding up C++ compilation
Martin Hořeňovský codingnest.comThis post is based on an internal training I prepared for my employer, Locksley, and showcases some sourcelevel techniques for improving C++ compilation times.

Generating random numbers using C++ standard library: the solutions
Martin Hořeňovský codingnest.comLast week I wrote about the various problem with using C++'s standard library (mainly <random>) to generate random numbers. This week I will outline what I think are the (standardizable) solutions to fix the functionality in <random> and make it widely usable.

Generating random numbers using C++ standard library: the problems
Martin Hořeňovský codingnest.comI found myself once again writing a long forum post about the problems with standardprovided random number generation facilities (both C++'s <random>, and C's rand) in C++. Since I keep writing these, I decided to write it all down into one blog post so that I can link it to people later.

The Coding Nest Modern SAT solvers: fast, neat and underused (part 1.5 of N)
Modern SAT solvers: fast, neat and underused (part 1.5 of N)
Martin Hořeňovský codingnest.comIn part 1 of this series, we built a Sudoku solver based on translating Sudoku to SAT and then giving the resulting SAT instance to a SAT solver. We also benchmarked our solver and found out that it, unsurprisingly, loses to the state of the art of Sudoku solvers. Since

The Coding Nest NDC TechTown and CppCon trip report
NDC TechTown and CppCon trip report
Martin Hořeňovský codingnest.comI just got home from the second conference I gave a talk at during September and decided to write about my experiences while I am slowly decompressing.

The Coding Nest Modern SAT solvers: fast, neat and underused (part 3 of N)
Modern SAT solvers: fast, neat and underused (part 3 of N)
Martin Hořeňovský codingnest.comIn the previous two parts we used a SAT solver as a black box that we feed input into, and it will (usually quickly) spit out an answer. In this part, we will look at how SAT solvers work and what heuristics and other tricks they employ in their quest for performance.