Skip to content

Bring autoload, project and static variable access speeds inline with script/function #8234

Open
@elvisish

Description

Describe the project you are working on

Benchmarking tool.

Describe the problem or limitation you are having in your project

The speed of accessing variables via autoloads, project settings and static variables is significantly slower than script or function variables, it would be beneficial if performance could be improved or documented that these methods of variable access were inherently slower.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

I would imagine GDScript 2.0 would make it easier to improve speed of variable access.

Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams

I wrote a simple benchmarker to test the speed to access and change variables in different ways:
ElvisishBenchmarker-main.zip
https://github.com/elvisish/ElvisishBenchmarker

If this enhancement will not be used often, can it be worked around with a few lines of script?

I think it would be engine work.

Is there a reason why this should be core and not an add-on in the asset library?

I think it would be engine work.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions