ferrous26/hotcocoa — comment on commit 8dd4fc52705cbc88c9e03b3526f3ef4a7f3bbf8d
File: lib/hotcocoa/delegate_builder.rb line 112
By ferrous26:

I have nothing in particular for this case. I just know that allocations are expensive in MacRuby (see http://ferrous26.github.com/blog/2011/08/21/jiraSOAP-0.9/), and that calling `#to_s` is going to cause an allocation to occur unless the parameter was already a string.

So, the cost here will depend on how many delegate methods you set up. It calls `#to_s` for each parameter of each method, I would guess that at around 50 delegate methods the slowdown might be perceptible. Not a big deal, but it adds up when you consider the rest of HotCocoa.

The real problem for me is that this essentially undoes something that I did earlier, but it does so by introducing new complexity instead of undoing what I did.