more efficient memory usage