Improve speed of param assignment using an array of strings