Java Is Very Fast, if You Don’t Create Many Objects

This article looks at a benchmark passing events over TCP/IP at 4 billion events per minute using the net.openhft.chronicle.wire.channel package in Chronicle Wire (open source) and why we aim to avoid object allocations. 

One of the key optimisations is creating almost no garbage. Allocation is supposed to be a very cheap operation, and garbage collection of very short-lived objects is also very cheap. Does not allocating really make such a difference? What difference does one small object per event (44 bytes) make to the performance in a throughput test where GC pauses are amortised?

CategoriesUncategorized