Excerpts from William Morgan's message of Mon Aug 24 19:24:19 -0400 2009:
> Reformatted excerpts from Rich Lane's message of 2009-08-22:
> > -    mk_person = lambda { |x| Person.new(*x.reverse!) }
> > +    mk_person = lambda { |x| QuickPerson.new(*x) }
> 
> What about lambda { |x| Person.new x[1], x[0] }. Surely that must be
> even faster?

The slow part is the processing in Person#initialize, which QuickPerson
overrides. You might also be able to avoid that by moving the
initialize() code into Person.from_address.
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk

Reply via email to