Eliminating even a single instruction is considered beneficial. Several of the protocols examined here have been aggressively tuned for years due to their use in numerous performance papers as evidence for the effectiveness of software-controlled cache coherence. Number counts how many optimization opportunities were found. Handlers use the incoming message buffer to send outgoing data messages, and must free it before exiting. Handlers can send data messages, which need a buffer, and control messages, which do not.
Many handlers send more than one message when responding to a request.
Unfortunately, while this strategy simplifies handler code, it increases buffer contention under high load. Our extension indicates when buffer frees can occur earlier in the code. Each of these optimizations could be implemented by changing only two lines of code. The extension also produced nine false positives. Most of these were cases where the execution path was too complex to optimize without major code restructuring.