memory usage optimizations for read and write operations

The comment doesn't seem to be matching the code.