Skip to content

Some modern GML functions for various performance gains #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

DragoniteSpam
Copy link

Not sure if you're still maintaining this repository, but:

In the intervening years since this repository was last updated, GameMaker added some nice functional programming features such as array_reduce, array_map, etc. These [are a fair amount faster than doing the loops manually in GameMaker in both VM and YYC)[https://dragonite.itch.io/gmbenchmark] and can be used in a handful of places.

There are a few other places where these could be used but I didn't, since I'm not familiar with some of the advanced math functions and wouldn't know how to unit test them.

Additionally, there are a few new GML features that could be used for stylistic/readability reasons (string_starts_with in the ini functions and optional arguments, for instance) but I decided those were a question for another day.

Lastly, in most places you seem to be caching the sizes of arrays before iterating over them, but there were a small number of loops that didn't do this, so I changed those over too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant