Improve speed of function calls