XML Benchmarks in D

Scott Sanders scott at stonecobra.com
Wed Mar 12 22:53:28 PDT 2008


N/A Wrote:

> == Quote from Sean Kelly (sean at invisibleduck.org)'s article
> > == Quote from N/A (NA at NA.na)'s article
> > > I generally handle files that are a few hundred MB to a few gigs
> and I noticed that the
> > > input is a char[], do you also plan on adding file streams as
> input?
> > I believe the suggested approach in this case is to access the
> input as a memory mapped file.  This does
> > place some restrictions on file size in 32-bit applications, but
> then those are ideally in decline.
> > Sean
> 
> Any examples on how to approach this using Tango?
> 
> Cheers,
> N/A
Should be able to:

auto fc = new FileConduit ("test.txt");
auto buf = new MappedBuffer(fc);
auto doc = new Document!(char);
doc.parse(buf.getContent());

That should do it.



More information about the Digitalmars-d mailing list