Subroutine - Disadvantages

Disadvantages

Invoking a subroutine (versus using in-line code) imposes some computational overhead in the call mechanism.

The subroutine typically requires standard housekeeping code – both at entry to, and exit from, the function (function prologue and epilogue – usually saving general purpose registers and return address as a minimum).

Read more about this topic:  Subroutine