At the moment, every time we call put, a new allocation in heap is happening (if I'm not mistaken). This may be very expensive, if we have many put calls with small data chunks (just a few bytes). Let's investigate how we can optimize this and then implement a new method. Before we do this, let's implement a performance test in order to measure the speed of current implementation. Then, compare new implementation with the current one.