aptxkid
Fix Flickering Relay Switch caused by Nest Learning Thermostat
Another reason why C++'s horrifying – initialization
C++ memory model as a distributed system
DNS – The First Distributed Database
There’s nothing 100% in computer science
My post focuses on the correctness, proof of the correctness of FDB’s failure recovery, some of which is missing even from the paper itself.
Some of the paper authors reached out; and I corrected one issue on my blog post pointed out by one of the authors.
It would probably be more productive to compare RDB and Graph with certain workload examples (OLTP, OLAP, joins, scans, etc.).
You’re right that graph db is very easy to use a lot of the times.
How FoundationDB works and why it works
Notes on the FoundationDB Paper with Additional Proof of Correctness
Paxos vs. Quorum-Based Consistency
Building Folly:Coro with GCC
You don't need virtual base dtor with smart pointers
How `Auto_increment` Works on MySQL
MyRocks' repeatable read isolation is actually snapshot isolation
C++ Map Lookup Memoization
First of all there's std::function, which uses Type Erasure https://blog.the-pans.com/type-erasure/. It means std::function<void(int)> can be the type of anything callable that takes an int and returns void (lambda, function pointer, object with operator() overload, etc.). Notice they are of different types! Hence Type Erasure.
How std::function manages its memory is poorly specified. But the standard at least states that if it's initialized from a function pointer (free, no capture), it's guaranteed that it won't allocate. https://en.cppreference.com/w/cpp/utility/functional/functio...
> When the target is a function pointer or a std::reference_wrapper, small object optimization is guaranteed, that is, these targets are always directly stored inside the std::function object, no dynamic allocation takes place.
In this case, std::function is trivially copyable. However, there's no way to know this at compile time, exactly because the type is erased in std::function.
checking std::is_trivially_copyable<FnPtrType>::value
using FnPtrType = int (*)(int) // for example