Richard Waller

The Performance Illusion

Performance is seductive. We optimize hot paths, eliminate allocations, use SIMD instructions. We measure, benchmark, profile. We chase every microsecond, every byte.

But performance is also an illusion. What we measure—CPU time, memory usage, throughput—isn’t what users experience. Users care about latency, responsiveness, predictability. They care about whether the system feels fast, not whether it is fast.

Measuring the Wrong Thing

Consider a web application. We might optimize database queries, reduce response time from 100ms to 50ms. But if the page still takes 2 seconds to become interactive—because of JavaScript parsing, because of layout shifts, because of network waterfalls—the user doesn’t notice the improvement.

Or consider Prism. We can process packets in 0.8 microseconds, achieving line rate on 100Gbps links. But if the application using Prism has high latency elsewhere—in its business logic, in its data structures, in its serialization—the network stack optimization doesn’t matter.

Performance is only as good as the slowest component. Optimizing one part while ignoring others is like tuning a race car’s engine while leaving flat tires.

The Predictability Problem

But even when we optimize the right things, there’s another problem: predictability. A system that’s fast on average but slow occasionally feels worse than a system that’s consistently moderate.

Consider Quasar. We optimized for predictable latency. P99 latency is 3.8ms, but more importantly, it’s consistent. There are no tail latencies of 100ms, no GC pauses, no lock contention spikes.

This predictability is often more valuable than raw performance. A trading system that’s consistently fast is better than one that’s usually faster but occasionally slow. The occasional slowness—the tail latency—is what causes problems.

The Complexity Cost

Optimization has a cost: complexity. Lock-free data structures are hard to write and harder to debug. Zero-copy architectures require careful memory management. Custom allocators introduce new failure modes.

This complexity isn’t just a development cost—it’s an operational cost. Complex systems are harder to understand, harder to debug, harder to modify. When something goes wrong, the fix takes longer.

Sometimes the right optimization is to simplify. Remove features, reduce scope, use simpler algorithms. A simple system that’s fast enough is often better than a complex system that’s faster.

The Premature Optimization Trap

We’re taught to avoid premature optimization, but it’s hard to know when optimization is premature. Is optimizing the network stack premature if network I/O is 50% of latency? Is optimizing database queries premature if they’re the bottleneck?

The key is measurement. Profile first, optimize second. But profiling is also an illusion—it tells you what’s slow now, not what will be slow later, not what users actually experience.

The Right Kind of Fast

The best performance optimizations aren’t about making code faster—they’re about making code unnecessary. Neon’s compile-time query optimization doesn’t just make queries faster—it eliminates entire classes of runtime errors, making the system more reliable.

Vortex’s GPU acceleration doesn’t just make simulations faster—it makes real-time simulation possible, enabling new use cases. The performance improvement enables new capabilities, not just faster versions of old capabilities.

Conclusion

Performance matters, but it’s easy to optimize the wrong thing. Measure what users experience, not just what’s easy to measure. Optimize for predictability, not just average case. Consider the complexity cost, not just the performance gain.

And remember: the best optimization is often to do less, not to do more. Remove code, simplify algorithms, eliminate features. A simple system that’s fast enough is better than a complex system that’s faster.

References



Links to this page

Change Log