std.xml: Why is it so slow? Is there anything else wrong with it?

Daniel Gibson metalcaedes at gmail.com
Sat Mar 12 20:39:31 PST 2011


Am 13.03.2011 05:34, schrieb dsimcha:
> There seems to be a consensus around here that Phobos needs a good XML
> module, and that std.xml doesn't cut it, at least partly due to
> performance issues. I have no clue how to write a good XML module from
> scratch. It seems like noone else is taking up the project either. This
> leads me to two questions:
>

Isn't Tomek Sowiński working on it?

> 1. Has anyone ever sat down and tried to figure out **why** std.xml is
> so slow? Seriously, if noone's bothered to profile it or read the code
> carefully, then for all we know there might be some low hanging fruit
> and it might be an afternoon of optimization away from being reasonably
> fast. Basically every experience I've ever had suggests that, if a piece
> of code has not already been profiled and heavily optimized, at least a
> 5-fold speedup can almost always be obtained just by optimizing the
> low-hanging fruit. (For example, see my recent pull request for the D
> garbage collector. BTW, if excessive allocations are a contributing
> factor, then fixing the GC should help with XML, too.)
>
> If the answer is no, this hasn't been done, please post some canned
> benchmarks and maybe I'll take a crack at it.
>
> 2. What other major defects/design flaws, if any, does std.xml have?
>
> In other words, how are we really so sure that we need to start from
> scratch?

(These questions should probably discusses nevertheless)

Cheers,
- Daniel


More information about the Digitalmars-d mailing list