Re: ayjwork squid3/src HttpRequestMethod...

From: Alex Rousskov <rousskov@dont-contact.us>
Date: Sat, 02 Feb 2008 17:14:55 -0700

On Sun, 2008-02-03 at 12:11 +1300, Amos Jeffries wrote:

> Alex, I'm droppign the conversion and not seeing many uses of METHOD_*
> as an int. the ones present however look to be important a keepers.
> You mentioned earlier when this class went it it might be an idea to
> look at removing the _method_t enum entirely.

I was thinking to make it private.

> After today I don't think it would be a good idea for performance.

Please give an example or two, where the performance would noticeably
suffer for standard methods.

> I'm thinking keeping GET, HEAD, POST, etc and any which are need for
> fast path switching in the code.

I doubt a switch-statement is noticeably faster than two or three "if
method.isGet()" if-statements, but if you disagree, then let's keep
those switch-statements in. We can still remove the auto-conversion
operator because it does not improve performance and causes other
problems.

Thank you,

Alex.
Received on Sat Feb 02 2008 - 17:15:04 MST

This archive was generated by hypermail pre-2.1.9 : Sat Mar 01 2008 - 12:00:09 MST