Improve performance (?) and memory usage