A Subtle Bug Before C++17

This post will show you a subtle performance bug due to unsupport for over-aligned types before C++17.

April 21, 2022 · Last updated on April 21, 2022 · 3 min

Iyengar111 NanoLog Source Code Reading

Overview Iyengar111/NanoLog is a fast and lightweight C++11 logging library. It has only less than a thousand lines of code. It’s less famous than another eponymous version, and this repo seems not under maintenance any longer. I read the source code for learning. This post delves into its technique details. Usage #include "NanoLog.hpp" int main() { nanolog::initialize(nanolog::GuaranteedLogger(), "/tmp/", "nanolog", 1); // nanolog::initialize(nanolog::NonGuaranteedLogger(3), "/tmp/", "nanolog", 1); LOG_INFO << "this is " << 42; return 0; } There are two modes to set when initializing....

April 9, 2022 · Last updated on April 9, 2022 · 11 min

Glog Source Code Reading Notes

A note for reading the source code of glog

March 12, 2022 · Last updated on March 12, 2022 · 12 min

How to Return Values Effectively in C++

This post will tell you the practices for returning values in Modern C++

March 1, 2022 · Last updated on March 1, 2022 · 7 min