Skip to content

v2.4.0

Choose a tag to compare

@michaelklishin michaelklishin released this 31 Dec 04:14
· 33 commits to main since this release
9ff521b

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 unpack1 instead of unpack().first throughout
  • Use byteslice instead of slice for binary string operations
  • Use getbyte for single byte access (4x faster than alternatives)
  • Adopted the frozen_string_literal pragma

The improvements on Ruby 3.4 are very meaningful:

  • AMQ::Pack.pack_uint64_big_endian: about 6.6x faster
  • AMQ::Pack.unpack_uint64_big_endian: about 7.2x faster
  • Basic.Deliver.decode: about 1.7x faster
  • Basic.Ack/Nack/Reject.encode: about 2.5x faster