Improve performance of non-captured local variables