From: "ry dahl" <ry-Xek56AhD01PHviPkdFu9cA@public.gmane.org>
To: mongrel-development-GrnCvJ7WPxnNLxjTenLetw@public.gmane.org
Subject: Re: [PATCH] http11: ~6% performance increase in header parsing
Date: Sat, 8 Mar 2008 18:37:53 +0100 [thread overview]
Message-ID: <3ae7f4480803080937y20b729e0vb9b549cb8184118f@mail.gmail.com> (raw)
In-Reply-To: <20080308081210.GA30702-r0bfCMRs158eIZ0/mPfg9Q@public.gmane.org>
> Then I'd have to define a new C function for every header I wanted to
> optimize for, and then also point to that function inside the Ragel file
> for each header.
Nah, you can just define
enum header_types {
MONGREL_CONTENT_LENGTH,
MONGREL_CONTENT_TYPE,
etc
}
and define a single callback to handle them
void (*field_cb)(http_parser*, int header_type, char *at, int len)
ry
prev parent reply other threads:[~2008-03-08 17:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20080229015309.GA9080@untitled>
[not found] ` <20080303044659.5a550c19.zedshaw@zedshaw.com>
[not found] ` <20080302123712.GA13979@hand.yhbt.net>
[not found] ` <20080306075421.GA1583@hand.yhbt.net>
[not found] ` <3ae7f4480803060153v18e955a5j9038f93e558f81d1@mail.gmail.com>
[not found] ` <3ae7f4480803060153v18e955a5j9038f93e558f81d1-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-03-08 8:12 ` [PATCH] http11: ~6% performance increase in header parsing Eric Wong
[not found] ` <20080308081210.GA30702-r0bfCMRs158eIZ0/mPfg9Q@public.gmane.org>
2008-03-08 8:14 ` Evan Weaver
[not found] ` <b6f68fc60803080014x3241d9b0n6430c5ec93f7ea2d-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-03-08 22:02 ` Eric Wong
2008-03-24 18:39 ` Evan Weaver
[not found] ` <b6f68fc60803241139g70b2d8a3v5d01e7472367fb74-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-03-25 3:43 ` Eric Wong
2008-03-25 4:53 ` Evan Weaver
[not found] ` <b6f68fc60803242153i65dbb67re6bc9457060ee03f-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2008-03-25 8:13 ` ry dahl
2008-03-08 12:37 ` Luis Lavena
2008-03-08 17:37 ` ry dahl [this message]
replies disabled, historical list
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).