cloudamqp / amq-protocol.cr

An AMQP 0.9.1 serialization library for Crystal
MIT License
10 stars 2 forks source link

Avoid heap allocation in Table #10

Open carlhoerberg opened 1 year ago

carlhoerberg commented 1 year ago

Allocate memory manually for the Table instead of relying on IO::Memory, which caused unnecessary heap allocations when the Table was empty.

This PR produces between 7 and 20% higher throughput in LavinMQ.