Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Two Studies in Compiler Optimisations. Parent comment
I guess you could define your assert() use [[assume]] in C++ for non-debug builds... but that seems like a very bad idea to me.
Just leave the asserts in prod. They almost certainly don't have measurable overhead. The few that do can be dealt with separately.
The Linux kernel has thousands of asserts which are always checked at runtime (BUG_ON).
There are no comments on this comment yet.
I guess you could define your assert() use [[assume]] in C++ for non-debug builds... but that seems like a very bad idea to me.
Just leave the asserts in prod. They almost certainly don't have measurable overhead. The few that do can be dealt with separately.
The Linux kernel has thousands of asserts which are always checked at runtime (BUG_ON).