httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Leggett <minf...@sharp.fm>
Subject Re: svn commit: r1026668 - /httpd/httpd/trunk/modules/proxy/mod_proxy.h
Date Sat, 23 Oct 2010 19:58:28 GMT
On 23 Oct 2010, at 9:51 PM, William A. Rowe Jr. wrote:

>> @@ -325,7 +325,7 @@ struct proxy_worker {
>>     apr_port_t      port;
>>     char            keepalive;
>>     char            disablereuse;
>> -    int             is_address_reusable;
>> +    int             is_address_reusable:1;
>>     proxy_conn_pool     *cp;        /* Connection pool to use */
>>     proxy_worker_stat   *s;         /* Shared data */
>>     void            *opaque;    /* per scheme worker data */
>
> No; this is a dis-optimization.  You have added int-bitmath cpu cycles
> to a simple int test, without gaining any storage.  Huh?

Are you sure?

I would expect a compiler optimiser to do the most appropriate thing,  
and it gets us out of the habit of allocating an int or a char every  
time we need a boolean flag.

Regards,
Graham
--


Mime
View raw message