future
Joined: 14 May 2004 Posts: 330
|
looking for a good way to seach arrays of strings |
Posted: Fri Nov 02, 2007 5:48 pm |
|
|
Hello everybody,
I am writing a script interpreter and looking for a better way to find my variable addresses.
A struct like:
Code: | struct {
char name[16];
int *var;
} _vars[32]; |
holds them. The variables are added to this struct as they are parsed.
Currently, every time the script accesses a variable, a linear scan is done to find the correct address.
Is there something I could do to speed up this process?
Thank you. |
|