Re: optional argument versus subroutine overloading
- From: "reubendb" <reubendb@xxxxxxxxx>
- Date: 28 Feb 2007 13:03:52 -0800
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.
.
- References:
- optional argument versus subroutine overloading
- From: reubendb
- Re: optional argument versus subroutine overloading
- From: Steve Lionel
- Re: optional argument versus subroutine overloading
- From: Jugoslav Dujic
- optional argument versus subroutine overloading
- Prev by Date: Re: Matlab -> Fortran
- Next by Date: Re: Array Constructors
- Previous by thread: Re: optional argument versus subroutine overloading
- Next by thread: End of record marker - 32 vs. 64 bit
- Index(es):
Relevant Pages
|