hail-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: Pete Zaitcev <zaitcev@redhat.com>
Cc: Project Hail List <hail-devel@vger.kernel.org>
Subject: Re: Trivial Q about chunkd's main_loop
Date: Sat, 17 Apr 2010 22:32:03 -0400	[thread overview]
Message-ID: <4BCA6F23.9010108@garzik.org> (raw)
In-Reply-To: <20100417193607.2fdded91@redhat.com>

On 04/17/2010 09:36 PM, Pete Zaitcev wrote:
> Is there a reason why the main_loop in chunkd uses a naked
> g_hash_table_lookup instead of srv_poll_lookup? Performance?
>
> @@ -1681,8 +1681,7 @@ static int main_loop(void)
>
>   			fired++;
>
> - 			sp = g_hash_table_lookup(chunkd_srv.fd_info,
> -						GINT_TO_POINTER(pfd->fd));
> +			sp = srv_poll_lookup(pfd->fd);
>   			if (G_UNLIKELY(!sp)) {

Looks like it should be changed to call srv_poll_lookup(), indeed. 
srv_poll_lookup() is marked 'static', so there should not be any 
performance difference after the compiler's optimizer passes get 
finished with it.

	Jeff



      reply	other threads:[~2010-04-18  2:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-18  1:36 Trivial Q about chunkd's main_loop Pete Zaitcev
2010-04-18  2:32 ` Jeff Garzik [this message]

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=4BCA6F23.9010108@garzik.org \
    --to=jeff@garzik.org \
    --cc=hail-devel@vger.kernel.org \
    --cc=zaitcev@redhat.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).