1. A method of improving performance efficiency in a communication system having a plurality of layered protocols by decreasing actual computation, communication latency and layering overhead, the method comprising the steps of: determining at least one common execution path in the communication system by identifying a common sequence of operations occurring in the plurality of layered protocols and identifying at least one condition allowing an event to be executed along the common execution path; and optimizing the speed of execution of the event along the common execution path by extracting the source code corresponding to the condition and the common sequence of operations, eliminating intermediate data structures and inlining functions called from the common sequence of operations.