You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by Rainer Klute <kl...@rainer-klute.de> on 2003/03/13 17:19:22 UTC

Re: Please review these FormulaParser Changes - Diff Version

>I agree completely but but but, im using a linkedlist 
specifically
>because i want to use it's specific features, getFirst() 
getLast() etc.
>I suppose I can switch to using indices but then that sort of 
only gives
>me one benefit from using the linked list (theoritcally should 
be more
>efficient, not using API simplification).

list.get(0) and list.get(list.size() - 1) should not give you 
any considerable performance penalty. I don't know how it is 
implemented but I where to implement a get() method for a doubly 
linked list I'd find out whether the index is closer to the 
beginning of the list or closer to its end and start traversing 
the list from there. Thus list.get(0) and list.get(list.size() - 
1) should perform well.

Best regards
Rainer Klute

                           Rainer Klute IT-Consulting GmbH
  Dipl.-Inform.
  Rainer Klute             E-Mail:  klute@rainer-klute.de
  Körner Grund 24          Telefon: +49 172 2324824
D-44143 Dortmund           Telefax: +49 231 5349423



Re: Please review these FormulaParser Changes - Diff Version

Posted by "Andrew C. Oliver" <ac...@apache.org>.
Then commit it :-)

If we hate it, we'll get the commit message on the mail list and slap 
you then ;-)

Danny Mui wrote:
> I got plenty of unit tests to stop you, so you better be right :)
> 
> attached is the list implemented stuff with the unit tests. and my 
> twisted arm.
> 
> interfaces goooood...
> 
> danny
> 
> Andrew C. Oliver wrote:
> 


Re: Please review these FormulaParser Changes - Diff Version

Posted by Danny Mui <da...@muibros.com>.
I got plenty of unit tests to stop you, so you better be right :)

attached is the list implemented stuff with the unit tests. and my 
twisted arm.

interfaces goooood...

danny

Andrew C. Oliver wrote:

> My opinion is that Rainer is right.  However, I'm certainly not 
> vetoing anything based on this kind of thing.
>
> I do think you need to excercise due care with regards to unit tests 
> for this.  Formula parsing is a nasty beast
> and I assure you, I will break your code next time I start hacking on 
> it if there is no unit test to stop me.  :-)
> Only I'll believe that my changes MUST be right...since all the unit 
> tests pass ;-)
>
> -Andy



Re: Please review these FormulaParser Changes - Diff Version

Posted by "Andrew C. Oliver" <ac...@apache.org>.
My opinion is that Rainer is right.  However, I'm certainly not vetoing 
anything based on this kind of thing.

I do think you need to excercise due care with regards to unit tests for 
this.  Formula parsing is a nasty beast
and I assure you, I will break your code next time I start hacking on it 
if there is no unit test to stop me.  :-)
Only I'll believe that my changes MUST be right...since all the unit 
tests pass ;-)

-Andy

Rainer Klute wrote:

>>I agree completely but but but, im using a linkedlist 
>>    
>>
>specifically
>  
>
>>because i want to use it's specific features, getFirst() 
>>    
>>
>getLast() etc.
>  
>
>>I suppose I can switch to using indices but then that sort of 
>>    
>>
>only gives
>  
>
>>me one benefit from using the linked list (theoritcally should 
>>    
>>
>be more
>  
>
>>efficient, not using API simplification).
>>    
>>
>
>list.get(0) and list.get(list.size() - 1) should not give you 
>any considerable performance penalty. I don't know how it is 
>implemented but I where to implement a get() method for a doubly 
>linked list I'd find out whether the index is closer to the 
>beginning of the list or closer to its end and start traversing 
>the list from there. Thus list.get(0) and list.get(list.size() - 
>1) should perform well.
>
>Best regards
>Rainer Klute
>
>                           Rainer Klute IT-Consulting GmbH
>  Dipl.-Inform.
>  Rainer Klute             E-Mail:  klute@rainer-klute.de
>  Körner Grund 24          Telefon: +49 172 2324824
>D-44143 Dortmund           Telefax: +49 231 5349423
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: poi-dev-help@jakarta.apache.org
>
>
>  
>