You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Marcus Crafter <cr...@fztig938.bank.dresdner.net> on 2002/02/25 20:56:19 UTC

[RT] Alternate VariableSizeBuffer ?

Hi Berin (& all),

	What do you think about the (untested) attachment. I'm wondering if
	the increase in code reuse yields too high a performance hit in
	comparison to the previous implementation ?

	Too slow ?

	Cheers,

	Marcus
-- 
        .....
     ,,$$$$$$$$$,      Marcus Crafter
    ;$'      '$$$$:    Computer Systems Engineer
    $:         $$$$:   ManageSoft GmbH
     $       o_)$$$:   82-84 Mainzer Landstrasse
     ;$,    _/\ &&:'   60327 Frankfurt Germany
       '     /( &&&
           \_&&&&'
          &&&&.
    &&&&&&&:

Re: [RT] Alternate VariableSizeBuffer ?

Posted by Peter Donald <pe...@apache.org>.
On Wed, 27 Feb 2002 12:09, Mark Woon wrote:
> Leif Mortenson wrote:
> > I agree, but try writing a performance test case.  You can test both
> > methods and
> > get some solid numbers.  Sometimes the code you think is fast is slow and
> > visavera.  Performance tests should be named xxxxProfile.java.
> >
> > Take a look at the following for example:
> > scratchpad/org/apache/avalon/excalibur/system/test/ContainerProfile.java
> > test/org/apache/avalon/excalibur/pool/test/SingleThreadedPoolComparisonPr
> >ofile.java
>
> Speaking of which, are there any documents on how to actually go about
> doing testing, either for functionality or performance?  There seems to be
> quite a bit of stuff in the way of a test harness, but before I go jumping
> into the code, perhaps there's something else I can read?

Well we use JUnit and you can find all the documentation for that on 
www.junit.org.

I don't know whether our profiling tests use this but there is a JUnit 
extension called JUnitPerf that I have heard good things about but never 
used. You may want to look at that because it is likely to have some good 
documentation about that sort of stuff.

Is this what you were asking ? 

-- 
Cheers,

Pete

-----------------------------------------------
   "You can't depend on your eyes when your 
   imagination is out of focus." -Mark Twain 
-----------------------------------------------

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [RT] Alternate VariableSizeBuffer ?

Posted by Mark Woon <mo...@SMI.Stanford.EDU>.
Leif Mortenson wrote:

> I agree, but try writing a performance test case.  You can test both
> methods and
> get some solid numbers.  Sometimes the code you think is fast is slow and
> visavera.  Performance tests should be named xxxxProfile.java.
>
> Take a look at the following for example:
> scratchpad/org/apache/avalon/excalibur/system/test/ContainerProfile.java
> test/org/apache/avalon/excalibur/pool/test/SingleThreadedPoolComparisonProfile.java

Speaking of which, are there any documents on how to actually go about doing testing,
either for functionality or performance?  There seems to be quite a bit of stuff in
the way of a test harness, but before I go jumping into the code, perhaps there's
something else I can read?

Thanks,
-Mark



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [RT] Alternate VariableSizeBuffer ?

Posted by Leif Mortenson <le...@silveregg.co.jp>.
Berin Loritsch wrote:

> Marcus Crafter wrote:
>
>> Hi Berin (& all),
>>
>>     What do you think about the (untested) attachment. I'm wondering if
>>     the increase in code reuse yields too high a performance hit in
>>     comparison to the previous implementation ?
>>
>>     Too slow ?
>
> If it ain't broke, don't fix it :)
>
> Seriously,  The two buffer implementations were created with very
> specific needs, and were highly tuned for those needs.  I think it would
> be a mistake to loose that tuning for code reuse.
>
> The FixedSizeQueue needs to be changed to use the FixedSizeBuffer, but
> I don't think it would be worth it to make VariableSizeBuffer extend
> FixedSizeBuffer. 

I agree, but try writing a performance test case.  You can test both 
methods and
get some solid numbers.  Sometimes the code you think is fast is slow and
visavera.  Performance tests should be named xxxxProfile.java.

Take a look at the following for example:
scratchpad/org/apache/avalon/excalibur/system/test/ContainerProfile.java
test/org/apache/avalon/excalibur/pool/test/SingleThreadedPoolComparisonProfile.java

Cheers,
Leif


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [RT] Alternate VariableSizeBuffer ?

Posted by Berin Loritsch <bl...@apache.org>.
Marcus Crafter wrote:
> Hi Berin (& all),
> 
> 	What do you think about the (untested) attachment. I'm wondering if
> 	the increase in code reuse yields too high a performance hit in
> 	comparison to the previous implementation ?
> 
> 	Too slow ?


If it ain't broke, don't fix it :)

Seriously,  The two buffer implementations were created with very
specific needs, and were highly tuned for those needs.  I think it would
be a mistake to loose that tuning for code reuse.

The FixedSizeQueue needs to be changed to use the FixedSizeBuffer, but
I don't think it would be worth it to make VariableSizeBuffer extend
FixedSizeBuffer.


-- 

"They that give up essential liberty to obtain a little temporary safety
  deserve neither liberty nor safety."
                 - Benjamin Franklin


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>