in reply to Performance issues with subroutines/methods
If you are being affected by subroutine calling speed, it's often the case that you have a single subroutine which is being called many times. You should be able to see this in the profiler.
If you only have a few call sites (places where you call this function) you can simply remove the function call overhead by manually inlining the function in those places (with appropriate comments). Of course, this isn't good coding style in general, but optimising for speed generally involves de-optimising for maintainability.
|
|---|