xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
- From: jcowan AT reutershealth.com
- To: Wolfgang Hoschek <whoschek AT lbl.gov>
- Cc: Elliotte Rusty Harold <elharo AT metalab.unc.edu>, xom-interest AT lists.ibiblio.org
- Subject: Re: [XOM-interest] Three cosmetic patches
- Date: Tue, 10 Feb 2004 15:48:10 -0500
Wolfgang Hoschek scripsit:
> I presume you mean the third patch about iteration vs. recursion.
> Nope, i haven't measured it. But what i gathered from CS studies and
> benchmarks years ago is that iteration is always faster than recursion
> because it avoids function calls, stack allocations and deallocations,
> processor register state switching, allows better compiler optimizations
> because it increases optimization scope, better register allocation,
> etc.
In addition, recursion is dangerous in Java in library routines that recurse
over user-supplied data, because the per-thread stack is of fixed size,
is typically set globally, and no recovery is possible if it overflows.
For that reason, my old DOMParser code (a DOM Level 1 analogue of XOM's
SAXConverter) used iteration instead of recursion, despite some criticism
I got for doing so.
--
John Cowan www.reutershealth.com www.ccil.org/~cowan
jcowan AT reutershealth.com
Arise, you prisoners of Windows / Arise, you slaves of Redmond, Wash,
The day and hour soon are coming / When all the IT folks say "Gosh!"
It isn't from a clever lawsuit / That Windowsland will finally fall,
But thousands writing open source code / Like mice who nibble through a wall.
-
[XOM-interest] Three cosmetic patches,
Wolfgang Hoschek, 02/09/2004
-
Re: [XOM-interest] Three cosmetic patches,
Elliotte Rusty Harold, 02/10/2004
-
Re: [XOM-interest] Three cosmetic patches,
Wolfgang Hoschek, 02/10/2004
-
Re: [XOM-interest] Three cosmetic patches,
jcowan, 02/10/2004
-
Re: [XOM-interest] Three cosmetic patches,
Elliotte Rusty Harold, 02/11/2004
-
Re: [XOM-interest] Three cosmetic patches,
jcowan, 02/11/2004
-
Re: [XOM-interest] Three cosmetic patches,
Elliotte Rusty Harold, 02/11/2004
- Re: [XOM-interest] Three cosmetic patches, jcowan, 02/11/2004
-
Re: [XOM-interest] Three cosmetic patches,
Elliotte Rusty Harold, 02/11/2004
-
Re: [XOM-interest] Three cosmetic patches,
jcowan, 02/11/2004
-
Re: [XOM-interest] Three cosmetic patches,
Elliotte Rusty Harold, 02/11/2004
-
Re: [XOM-interest] Three cosmetic patches,
Wolfgang Hoschek, 02/11/2004
- Re: [XOM-interest] Three cosmetic patches, Francois Beausoleil, 02/11/2004
-
Re: [XOM-interest] Three cosmetic patches,
jcowan, 02/10/2004
-
Re: [XOM-interest] Three cosmetic patches,
Wolfgang Hoschek, 02/10/2004
- <Possible follow-up(s)>
-
Re: [XOM-interest] Three cosmetic patches,
Trimmer, Todd, 02/12/2004
- Re: [XOM-interest] Three cosmetic patches, Elliotte Rusty Harold, 02/12/2004
- RE: [XOM-interest] Three cosmetic patches, Trimmer, Todd, 02/13/2004
-
Re: [XOM-interest] Three cosmetic patches,
Elliotte Rusty Harold, 02/10/2004
Archive powered by MHonArc 2.6.24.