in reply to Subroutine speed

99.9% of the time (at least), the overhead that subroutines, objects, dynamic memory allocation, etc introduces is NOT relevent. If it was, we'd all still be programming in assembler. Processing speed is (these days) a very minor consideration in programming. Much more important is maintainability of code, which is vastly improved by minimising code duplication.