XML Benchmarks in D
Kris
foo at bar.com
Thu Mar 13 15:43:08 PDT 2008
BCS Wrote:
> Sean Kelly wrote:
> > == 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
>
> what might be interesting is to make a version that works with slices of
> the file rather than ram. (make the current version into a template
> specialized on char[] and the new one on some new type?) That way only
> the parsed meta data needs to stay in ram. It would take a lot of games
> mapping stuff in and out of ram but it would be interesting to see if it
> could be done.
It would be interesting, but isn't that kinda what memory-mapped files provides for? You can operate with files up to 4GB in size (on a 32bit system), even with DOM, where the slices are virtual addresses within paged file-blocks. Effectively, each paged segment of the file is a lower-level slice?
More information about the Digitalmars-d
mailing list