Releases: ruby-amqp/amq-protocol
Releases · ruby-amqp/amq-protocol
v2.5.1
v2.5.0
Changes between 2.4.0 and 2.5.0 (Dec 31, 2025)
Additional Consumer Hot Path Optimizations
A few more decode method optimizations for consumer delivery code paths.
v2.4.0
Changes between 2.3.4 and 2.4.0 (Dec 30, 2025)
Performance Improvements
Optimized encoding and decoding hot paths:
- Built-in
Q>/q>packing/unpacking directives are 6-7x faster than the original implementation (that originally targeted Ruby 1.8.x) - Switched to
unpack1instead ofunpack().firstthroughout - Use
bytesliceinstead ofslicefor binary string operations - Use
getbytefor single byte access (4x faster than alternatives) - Adopted
frozen_string_literalpragma
The improvements on Ruby 3.4 are very meaningful:
AMQ::Pack.pack_uint64_big_endian: about 6.6x fasterAMQ::Pack.unpack_uint64_big_endian: about 7.2x fasterBasic.Deliver.decode: about 1.7x fasterBasic.Ack/Nack/Reject.encode: about 2.5x faster