Measuring the average time to serialize a bitmap in memory