cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Curdt <tcu...@vafer.org>
Subject Re: [RT] SAX stream buffering
Date Wed, 19 Nov 2003 11:55:55 GMT
Ugo Cei wrote:

> Torsten Curdt wrote:
> 
>> buf.length << 1 is a shift operation which is the same
>> as buf.length*2. The Max() chooses the bigger value.
>>
>> So that method is fine ;)
> 
> 
> But a little too clever for my taste ;-). It reminds me of the old days 
> with C compilers who weren't smart enough to convert a 
> multiplication/division by a power of 2 into a left/right shift. I 
> thought those days had passed forever, but it seems there's always 
> someone thinking he can outsmart the compiler ;-).

...I thought so too until I had a look into BCEL ;)

We could use that to see if the compiler is smart enough to
optimize that on his own :) ...at least it would be interesting
to know for the future.
--
Torsten


Mime
View raw message