7 Vibe performance engineering: when assumptions mislead
This chapter covers
- Are LLM tools prone to the same mistakes as humans for performance engineering?
- Optimizing to the hot-path vs automatically addressing broader performance issues
- Identifying the implicit assumptions about the trade-offs that LLM tools can make
Performance work often goes wrong in two predictable ways: optimizing based on false assumptions, and failing to optimize the hot-path. The hot-path is a part of your code that does most of the work and is executed for almost every user request. Both mistakes lead to the same outcome: more complexity, more maintenance burden, and little real benefit in production.
Understanding these two concepts is essential before delving into vibe engineering techniques, as they directly impact the performance engineering process.
The first issue is premature optimization, specifically when code is optimized without input data on expected traffic or a service-level agreement (SLA), making it difficult to reason about the code's required performance. Optimizing random code paths in such a situation is like shooting in the dark. You complicate your code for no good reason.