Tagged With: C/C++
Infographics: Operation Costs in CPU Clock Cycles, Take 2
June 19, 2026 by âą âNo Bugsâ Bunny
Quote
The cost of thread context switch, including cache invalidation, can reach up to 3 million CPU cycles
Another Quote
RTTI can be quite expensive, with
dynamic_cast<>being up to 5x more expensive than a simple virtual function call
Filed under: On.ProgrammingOptimizations
On CPU Physics and CPU Cycles
June 10, 2026 by âą âNo Bugsâ Bunny
Quote
as active portion of the stack is accessed extremely frequently, it is almost-guaranteed to be cached
Another Quote
main memory access latencies of an x64 desktop box, and an M4 Apple SoC happen to be in the same ballpark of about 200-300 CPU cycles
Filed under: On.ProgrammingProgramming Languages
Java vs C++: Trading UB for Semantic Memory Leaks (Same Problem, Different Punishment for Failure)
October 30, 2018 by âą âNo Bugsâ Bunny
Quote:
with all due disrespect to mutable static/global data, I have to say that the problem of semantic memory leaks is NOT restricted to statics
Another Quote:
semantics of good code is about the same regardless of Java/C++ choice
Filed under: On.ProgrammingProgramming Languages
Read moreC++: "model of the hardware" vs "model of the compiler"
October 3, 2018 by âą âNo Bugsâ Bunny
Quote:
we MUST NOT care about compiler internals beyond our task definition (which is based on (a) humans, and (b) hardware, thatâs it).
Another Quote:
My problem with introducing a âmodel of the compilerâ into the picture, is that it can be used to justify pretty much anything without any relation to real-world requirements.
Filed under: On.ProgrammingProgramming LanguagesOn.DevelopmentDevelopment Philosophy