ruby-amqp/amq-protocol — pull request #27 by gdb (2013-01-21 05:48:51+00:00)
Title: Make encoder faster on large payloads

To compare, try something like this:

AMQ::Protocol::BodyFrame.new('hi' * 10000000, 2).encode

This patch eliminates unnecessary copies of and iterations over the
payload.