Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] [ANN] nux-1.0beta2 release

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Wolfgang Hoschek <whoschek AT lbl.gov>
  • To: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] [ANN] nux-1.0beta2 release
  • Date: Sun, 14 Nov 2004 10:06:28 -0800

On Nov 14, 2004, at 3:54 AM, Elliotte Harold wrote:

Wolfgang Hoschek wrote:


#2 UTF conversion of large strings is fast, but for small strings (the common case) it is the opposite (setup costs), and hence Text is a hotspot as well.

Could you define small? Is there an inflection point somewhere?

I'd say small is < 10K or perhaps < 1K, but that's just merely an educated guess. If I remember it correctly, 2 MB strings can be converted at 50MB/s or somewhere in that ballpark.

Possibly I could look at optimizing this better for small strings, or even use String for small strings and UTF-8 for large ones, though that probably would cost more than it would save. I'd have to profile and see.

It's not clear to me how one could improve the situation. Doesn't look like a "one Text class fits all" scenario. Might be better to just have two Text classes, each addressing a separate specific need.

Wolfgang.





Archive powered by MHonArc 2.6.24.

Top of Page