Skip to content

Optional argument impact on runtime #152

Open
@leonfoks

Description

@leonfoks

At the risk of discussing early over-optimization... I want to discuss the possible speed and optimization issues with having too many optional arguments.

I can't remember which class I took, but I distinctly remember someone saying that optional arguments can be a serious slowdown in large scale applications. I'm not sure if this is true so i'm asking!

Can anyone shed some light on how the compilers generally handle optional arguments? Are optional arguments determined at compile time? Or at runtime? If the latter, could there potentially be a substantial slowdown in large scale code?

Why am I bringing this up now? In the discussions of nan() and var() optional arguments are present, and i wanted to bring this up in case it is important before we move too far ahead with other modules. If we can potentially prevent a base level of slowdown due to optional arguments, that might be advantageous at this point???

Am I overthinking this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    implementationImplementation in experimental and submission of a PR

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions