Skip to Content.
Sympa Menu

xom-interest - RE: [XOM-interest] Attributes performance patch

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: "Michael Kay" <mike AT saxonica.com>
  • To: "'Elliotte Harold'" <elharo AT metalab.unc.edu>, "'Wolfgang Hoschek'" <whoschek AT lbl.gov>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: RE: [XOM-interest] Attributes performance patch
  • Date: Mon, 22 Nov 2004 12:04:29 -0000

Back in my assembler days, we always counted down where possible because
comparing with zero took one instruction and comparing with anything else
took two. But heaven only knows whether that's a universal truth!

Michael Kay

> -----Original Message-----
> From: xom-interest-bounces AT lists.ibiblio.org
> [mailto:xom-interest-bounces AT lists.ibiblio.org] On Behalf Of
> Elliotte Harold
> Sent: 22 November 2004 10:54
> To: Wolfgang Hoschek
> Cc: xom-interest AT lists.ibiblio.org
> Subject: Re: [XOM-interest] Attributes performance patch
>
> Wolfgang Hoschek wrote:
>
> > for (int i=attributes.size(); --i >= 0; ) {
>
> Is there a particular reason you're counting down instead of up here?
> Are you just trying to avoid calling attributes.size() more than once?
>
> --
> Elliotte Rusty Harold elharo AT metalab.unc.edu
> XML in a Nutshell 3rd Edition Just Published!
> http://www.cafeconleche.org/books/xian3/
> http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/
> ref=nosim
> _______________________________________________
> XOM-interest mailing list
> XOM-interest AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/xom-interest
>





Archive powered by MHonArc 2.6.24.

Top of Page