Re: optional argument versus subroutine overloading



On Feb 28, 12:58 pm, "Jugoslav Dujic" <jdu...@xxxxxxxxx> wrote:
Steve Lionel wrote:
| reubendb wrote:

|
|| Is function/subroutine overloading actually resolved
|| during compilation, or during run time, as in the case of presence
|| test ?
|
| Overloading is typically resolved at compile time. I'd be astonished
| if any implementation did it differently.

...and testing for presence of optional arguments, while not "free",
is extremely cheap. Thus, no real performance concerns in any case.

--
Jugoslav

OK. So from the last two responds it seems that using optional
arguments shouldn't result in any penalty in performance, compared to
function overloading in this case. Thanks for the responds.


.



Relevant Pages

  • Re: optional argument versus subroutine overloading
    ... || during compilation, or during run time, as in the case of presence ... ....and testing for presence of optional arguments, while not "free", ... no real performance concerns in any case. ...
    (comp.lang.fortran)
  • optional argument versus subroutine overloading
    ... while if doing I need to repeat some part of codes that are ... presence test) is going to be called many times ... Is function/subroutine overloading actually resolved ...
    (comp.lang.fortran)