No kidding? That's cool; learn something new every day.


On Wed, Jan 16, 2013 at 12:04 AM, Dan Allen <notifications@github.com>wrote:

> In lib/asciidoctor/block.rb:
>
> > @@ -108,7 +108,7 @@ def content
> >        if !@buffer.nil?
> >          apply_normal_subs(@buffer)
> >        else
> > -        @blocks.map(&:render).join
> > +        @blocks.map {|b| b.render }.join
>
> I've been studying optimization techniques for Ruby (because I'm quite
> fascinated by how fast this implementation is getting). Apparently, in
> several versions of Ruby, resolving a proc is measurably slower than
> running a map operation on Enumerable. In the long run, it should end up
> being a wash because Ruby can optimize both cases equally (and maybe even
> eventually the proc reference becomes faster), but benchmark proves that
> for now, we get better performance out of the longhand.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/erebor/asciidoctor/pull/85/files#r2661545>.
>
>