{"id":30694821,"url":"https://github.com/ratismal/gms2-benchmark","last_synced_at":"2026-02-16T19:05:45.752Z","repository":{"id":188367226,"uuid":"621080595","full_name":"Ratismal/gms2-benchmark","owner":"Ratismal","description":"GameMaker Studio 2 Data Structure Benchmark","archived":false,"fork":false,"pushed_at":"2023-03-30T00:31:55.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-18T14:10:08.078Z","etag":null,"topics":["benchmark","data-structures","gms2"],"latest_commit_sha":null,"homepage":"","language":"Yacc","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ratismal.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-03-30T00:31:53.000Z","updated_at":"2023-12-06T20:01:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"f9ccd20b-afa8-47ca-aa0c-954a0cc513fb","html_url":"https://github.com/Ratismal/gms2-benchmark","commit_stats":null,"previous_names":["ratismal/gms2-benchmark"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Ratismal/gms2-benchmark","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ratismal%2Fgms2-benchmark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ratismal%2Fgms2-benchmark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ratismal%2Fgms2-benchmark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ratismal%2Fgms2-benchmark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ratismal","download_url":"https://codeload.github.com/Ratismal/gms2-benchmark/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ratismal%2Fgms2-benchmark/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273244304,"owners_count":25070959,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-02T02:00:09.530Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["benchmark","data-structures","gms2"],"created_at":"2025-09-02T06:45:08.713Z","updated_at":"2026-02-16T19:05:40.724Z","avatar_url":"https://github.com/Ratismal.png","language":"Yacc","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GameMaker Data Structure Benchmark\n\nThis is a project to do a simple benchmark of GameMaker's various data structures.\n\n## Running\n\nTo run, simply clone the project and run. You may look at the `init` script to define the tests that are run, and how many loops are run of each.\n\nResults will be outputted in console.\n\n## Tests\n\nThe current tests I've done are:\n\n| Test Label | Description |\n| ---------- | ----------- |\n| Array | A basic test with `array_create(length)`, using accessors. |\n| Array (Func) | A basic test with `array_create(length)`, using `array_get` and `array_set` functions. |\n| Array (Raw) | A basic test with `[]`, using accessors. |\n| Array (Un-Initialized) | A basic test with an undefined array, using accessors. |\n| List | A basic test with `ds_list_create`, using accessors. |\n| List (Func) | A basic test with `ds_list_create`, using `ds_list_set` and `ds_list_find_values`. |\n| Map | A basic test with `ds_map_create`, using accessors. |\n| Map (Func) | A basic test with `ds_map_create`, using `ds_map_set` and `ds_map_find_value`. |\n| Struct | A basic test with `{}`, using accessors. |\n| Struct (Func) | A basic test with `{}`, using `variable_struct_set` and `variable_struct_get`. |\n\nI haven't tested grids, stacks, queues, or priority queues at this time, as the same tests cannot be done on them. They may be added at a later date.\n\n## Results\n\nFor each test, a subsequent test of 100, 1000, 10000, and 100000 loops were performed. For each of these, 20 runs were run. The average, highest, and lowest results were recorded.\n\nTest Label | Loops | Fill Average | Read Average | Fill (Highest) | Read (Highest) | Fill (Lowest) | Read (Lowest)\n------ | ------ | ------ | ------ | ------ | ------ | ------ | ------\nArray | 100 | 0.02 | 0.02 | 0.03 | 0.02 | 0.01 | 0.01\nArray | 1000 | 0.13 | 0.11 | 0.14 | 0.13 | 0.12 | 0.11\nArray | 10000 | 1.28 | 1.19 | 2.03 | 1.57 | 1.14 | 1.09\nArray | 100000 | 11.93 | 11.83 | 14.25 | 14.41 | 10.96 | 10.71\nArray (Func) | 100 | 0.01 | 0.01 | 0.02 | 0.02 | 0.01 | 0.01\nArray (Func) | 1000 | 0.13 | 0.14 | 0.21 | 0.22 | 0.12 | 0.12\nArray (Func) | 10000 | 1.44 | 1.60 | 2.18 | 2.31 | 1.14 | 1.18\nArray (Func) | 100000 | 12.99 | 14.20 | 18.93 | 21.48 | 11.47 | 12.03\nArray (Raw) | 100 | 0.03 | 0.01 | 0.08 | 0.02 | 0.03 | 0.01\nArray (Raw) | 1000 | 0.99 | 0.15 | 6.27 | 0.28 | 0.50 | 0.11\nArray (Raw) | 10000 | 29.24 | 1.33 | 33.34 | 2.34 | 27.10 | 1.05\nArray (Raw) | 100000 | 9239.33 | 10.90 | 9639.25 | 12.00 | 8813.77 | 10.63\nArray (Un-Initialized) | 100 | 0.03 | 0.01 | 0.05 | 0.02 | 0.03 | 0.01\nArray (Un-Initialized) | 1000 | 0.51 | 0.12 | 0.62 | 0.13 | 0.49 | 0.11\nArray (Un-Initialized) | 10000 | 27.13 | 1.15 | 27.79 | 1.17 | 26.82 | 1.13\nArray (Un-Initialized) | 100000 | 9311.16 | 11.13 | 10257.53 | 11.88 | 8812.28 | 10.66\nList | 100 | 0.01 | 0.01 | 0.04 | 0.03 | 0.01 | 0.01\nList | 1000 | 0.15 | 0.12 | 0.24 | 0.14 | 0.13 | 0.11\nList | 10000 | 2.90 | 1.22 | 3.34 | 1.80 | 2.74 | 1.06\nList | 100000 | 624.14 | 10.90 | 802.53 | 13.96 | 567.91 | 10.48\nList (Func) | 100 | 0.01 | 0.01 | 0.02 | 0.02 | 0.01 | 0.01\nList (Func) | 1000 | 0.14 | 0.11 | 0.16 | 0.13 | 0.13 | 0.11\nList (Func) | 10000 | 2.83 | 1.17 | 3.13 | 1.60 | 2.79 | 1.13\nList (Func) | 100000 | 600.53 | 10.77 | 787.91 | 12.85 | 550.06 | 10.34\nMap | 100 | 0.02 | 0.01 | 0.03 | 0.02 | 0.02 | 0.01\nMap | 1000 | 0.17 | 0.15 | 0.19 | 0.16 | 0.17 | 0.14\nMap | 10000 | 3.33 | 3.05 | 4.45 | 3.75 | 2.95 | 2.50\nMap | 100000 | 287.37 | 273.31 | 451.13 | 488.60 | 244.12 | 240.14\nMap (Func) | 100 | 0.02 | 0.01 | 0.03 | 0.02 | 0.02 | 0.01\nMap (Func) | 1000 | 0.18 | 0.16 | 0.20 | 0.29 | 0.17 | 0.14\nMap (Func) | 10000 | 3.49 | 3.37 | 3.71 | 3.59 | 3.33 | 3.15\nMap (Func) | 100000 | 266.50 | 271.39 | 359.94 | 511.87 | 241.51 | 237.36\nStruct | 100 | 0.03 | 0.03 | 0.08 | 0.05 | 0.03 | 0.03\nStruct | 1000 | 0.33 | 0.28 | 0.68 | 0.34 | 0.29 | 0.27\nStruct | 10000 | 4.81 | 2.90 | 30.53 | 3.32 | 3.24 | 2.74\nStruct | 100000 | 167.04 | 34.67 | 2624.30 | 41.29 | 34.10 | 29.36\nStruct (Func) | 100 | 0.03 | 0.03 | 0.04 | 0.04 | 0.03 | 0.03\nStruct (Func) | 1000 | 0.32 | 0.28 | 0.58 | 0.41 | 0.30 | 0.26\nStruct (Func) | 10000 | 3.38 | 2.83 | 3.73 | 2.96 | 3.16 | 2.77\nStruct (Func) | 100000 | 37.46 | 35.25 | 44.44 | 44.44 | 32.63 | 30.43\n\n## Takeaways\n\n- Arrays that have their length pre-defined are by far the most efficient.\n- Arrays that *don't* have their length pre-defined are by far the *least* efficient.\n- In general, it's quicker to use functions to access values than the accessors. The difference is negligable unless using a giant dataset, though.\n- If you're using maps as an array alternative... it's actually more efficient than using lists! So keep at it! (or switch to structs).\n- Structs are much faster than maps and lists, and come second only to pre-defined arrays.\n- There's something funky with the struct accessor results. I have no idea what's going on, but the function methods seem to be more reliable.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fratismal%2Fgms2-benchmark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fratismal%2Fgms2-benchmark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fratismal%2Fgms2-benchmark/lists"}