Since you're only reading from the lookup table why not make it either global or static to the function instead of creating it on the stack each time the function is called?
I'd vote for static (indeed, I did so when I rolled this into a private dev lib I use when coding stuff "for my eyes only"). First, global variables are icky if overused. In fact, I've only ever used them for one thing: CGI request state variables. Static vars answer the problem much more cleanly.
I've got good news, and I've got bad news: The universe is merely a figment of my imagination. Now are you ready for the bad news?
Bobby R Ward
---------------------
bobbyrward@gmail.com
I've got good news, and I've got bad news:
The universe is merely a figment of my imagination.
Now are you ready for the bad news?