• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Windows Enums and lists vs variables. What is faster?

A

Aura

Guest
It would be better if you elaborate on the context a bit more.
 

JaimitoEs

Member
Basically the accessing speed of the data:

Variables:
Code:
variable1 = 20;
variable2 = " hello";
variable3 = 3000;
variable4 = 500;
List and enums :

Code:
enum variables
{
 force,
 name,
 healt,
 lives
}

list = ds_list_create();

list[| variables.force] = 20;
list[| variables.name] = "hello";
list[| variables.healt] = 30;
list[| variables.lives] = 500;
accessing :
Code:
strenght = variable1;

or

strenght = list[ variables.force];
 
Top