xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
Re: [XOM-interest] Possible ArrayList optimization
- From: Elliotte Rusty Harold <elharo AT metalab.unc.edu>
- To: Janek Bogucki <janekdb AT yahoo.co.uk>, xom-interest <xom-interest AT lists.ibiblio.org>
- Cc:
- Subject: Re: [XOM-interest] Possible ArrayList optimization
- Date: Mon, 12 May 2003 22:14:09 -0400
At 10:05 PM +0100 5/11/03, Janek Bogucki wrote:
Is there any reason why an invocation of ArrayList.trimToSize (), after the array has had all
items added to it, would be inappropriate? This would minimise the storage cost.
I hadn't thought of that. How expensive is trimToSize()? Probably O(1) I expect, and you might be able to make that up by not having to constantly grow the arrays as you build the document. Just start them fairly large, and then chop it down when you're finished. I'll try it out and see what it does to the numbers.
--
Elliotte Rusty Harold
elharo AT metalab.unc.edu
Processing XML with Java (Addison-Wesley, 2002)
http://www.cafeconleche.org/books/xmljava
http://www.amazon.com/exec/obidos/ISBN%3D0201771861/cafeaulaitA
-
Re: [XOM-interest] Possible ArrayList optimization
, (continued)
- Re: [XOM-interest] Possible ArrayList optimization, John Cowan, 05/09/2003
-
Re: [XOM-interest] Possible ArrayList optimization,
dirk bergstrom, 05/09/2003
-
Re: [XOM-interest] Possible ArrayList optimization,
Elliotte Rusty Harold, 05/09/2003
- Re: [XOM-interest] Possible ArrayList optimization, Elliotte Rusty Harold, 05/11/2003
-
Re: [XOM-interest] Possible ArrayList optimization,
Elliotte Rusty Harold, 05/09/2003
-
Re: [XOM-interest] Possible ArrayList optimization,
Bradley S. Huffman, 05/09/2003
- Re: [XOM-interest] Possible ArrayList optimization, Elliotte Rusty Harold, 05/10/2003
-
Re: [XOM-interest] Possible ArrayList optimization,
Elliotte Rusty Harold, 05/11/2003
-
Re: [XOM-interest] Possible ArrayList optimization,
Bradley S. Huffman, 05/12/2003
- Re: [XOM-interest] Possible ArrayList optimization, Elliotte Rusty Harold, 05/12/2003
-
Re: [XOM-interest] Possible ArrayList optimization,
Bradley S. Huffman, 05/12/2003
-
Re: [XOM-interest] Possible ArrayList optimization,
Janek Bogucki, 05/11/2003
-
Re: [XOM-interest] Possible ArrayList optimization,
Elliotte Rusty Harold, 05/12/2003
-
Re: [XOM-interest] Possible ArrayList optimization,
dirk bergstrom, 05/12/2003
-
Re: [XOM-interest] Possible ArrayList optimization,
Elliotte Rusty Harold, 05/13/2003
- Re: [XOM-interest] Possible ArrayList optimization, Karl Waclawek, 05/13/2003
-
Re: [XOM-interest] Possible ArrayList optimization,
Elliotte Rusty Harold, 05/13/2003
-
Re: [XOM-interest] Possible ArrayList optimization,
dirk bergstrom, 05/12/2003
-
Re: [XOM-interest] Possible ArrayList optimization,
Elliotte Rusty Harold, 05/12/2003
- RE: [XOM-interest] Possible ArrayList optimization, New, Cecil (GEAE), 05/13/2003
Archive powered by MHonArc 2.6.24.