To support a low-latency trading system I needed a logging call that had minimal impact on the calling thread. It was imperative to be responsive to market events at all times. My […]
Pitfalls of Performance Testing
Beware the casual performance test, it will lie to you. It is simple to write something that gives you timings, but it is difficult to make those timings meaningful. A whole host […]
What is reference counting?
Objects are created, live for a while, and then destroyed. While creation is fairly clear, the when and how of destruction is fairly language dependent. In languages like C you’re basically on […]
What’s an object? What’s a variable?
A variable is is the most fundamental concept in programming. You can’t do anything without variables. Yet most languages let you gloss over what these actually are. Simplicity often hides the truth. […]
No new language will stop your program from crashing
New languages try to improve the lives of programmers by simplifying some aspect of programming. Many make bold claims about eliminating certain types of errors, yet in the end none of them […]
Why Garbage Collection is not Necessary and actually Harmful
In the world of new languages it seems like garbage collection is standard feature. A way for the runtime to locate unused bits of memory and release them. It has become so […]
What is an atomic operation?
We all know that operations in a computer happen one after the other. Having multiple CPUs and instruction reordering tends to obfuscate the issue. Technically things still proceed in an orderly fashion, […]
CPU Memory – Why do I need a mutex?
Multi-threaded programming calls for semaphores, synchronized blocks, mutexes, or whatever your language happens to call them. Most of us basically understand why we need them: to prevent multiple-threads from accessing the same […]
The Cost – Instantiation and the hidden enemy “new”
Whether C++, Java or any other language, we are all familiar with instantiating an object. In those aforementioned languages the operator new happens to do just that. Obviously CPUs don’t have any […]