From: rlane@club.cc.cmu.edu (Rich Lane)
Subject: [sup-talk] [PATCH] add xapian-specific hack to quickly create a Person
Date: Tue, 25 Aug 2009 21:50:48 -0400 [thread overview]
Message-ID: <1251250991-sup-3593@zyrg.net> (raw)
In-Reply-To: <1251156216-sup-5563@masanjin.net>
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.
next prev parent reply other threads:[~2009-08-26 1:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-22 18:28 [sup-talk] [PATCH] add Message#load_from_index! shortcut Rich Lane
2009-08-22 18:54 ` [sup-talk] [PATCH] add xapian-specific hack to quickly create a Person Rich Lane
2009-08-24 23:24 ` William Morgan
2009-08-26 1:50 ` Rich Lane [this message]
2009-09-01 20:59 ` William Morgan
2009-08-24 23:23 ` [sup-talk] [PATCH] add Message#load_from_index! shortcut William Morgan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1251250991-sup-3593@zyrg.net \
--to=rlane@club.cc.cmu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox