This has results for sysbench on a small server and compares performanc for Postgres, MySQL and MariaDB compiled using clang vs using gcc.tl;drThroughput with clang and gcc is similarBuilds, configuration and hardwareI compiled Postgres 18.3, MySQL 8.4.8 and MariaDB 11.8.6 from source. The server...
A feature introduced in C++20 is modules. With C++23, the standard library is now supposed to provide an std module that can be used instead of all the #includes that we are used to. This allows code like the following: import std; int main() { std::print("Hello world!\n"); } While...
Structures allow us to combine several variables to create a new data type. Some other languages support the same concept but call it “records”. If you come from object-oriented programming you can think about them as classes without methods. Declaration A structure is declared by the keyword...
Two weeks ago, I came across an interesting bug. The convert() function below returns 0x80000001 when p points to 0x01, 0x00, 0x00, 0x80, but the expected return value is 0x00000001 instead. int32_t convert(const uint8_t *restrict p) { uint32_t x = ( p[0] + 256...
Code coverage is a metric to show the code being untested. It can be considered as a hint to add more test cases. When we are writing C/C++, the most notable code coverage testing tool is gcov, which is a GCC built-in coverage testing tool. Besides, we can collect the results and generate...
In this post, I would like to introduce the bugpoint command line tool. This is a automatic test case reduction tool which can help us generate minimal test case. As a compiler developer, the first step to debug is to create a minimal test case which can still reproduce the bug. Unfortunately,...