On Tue Mar 01, 2005 at 23:02:59 +1100, Michael Knight wrote:
>Hi all,
>
>I'm starting an honours year at uni this year. My supervisor and I are
>thinking of doing a paper on trying to determine if memory-mapping
>source files will speed up the lexical analysis phase of various
>compilers (instead of whatever buffering method it currently employs).
>
>While we can't find any similar publications on the subject that
>obviously doesn't mean no one out there has done anything on it. Has
>anyone heard of any work done on this kind of thing before?

This sounds interesting but I would have thought that it was as much
an operating systems thing as a languages compilers thing.

One thing to watch out for is that this is likely to be OS dependant;
how the IO system, buffering and paging is implemented will have a
large affect on results.

From the systems I've tested on (MacOSX/PPC, Linux2.6.10/ia32), mmap
is a much faster than alternatives, the question is however, how much
impact that would have on the speed of the lexer.

I think the main thing you would need to show first is that in current
lexers I/O is the dominating factor, and not say, the actual lexing of
the data. I wouldn't have expected I/O costs to be dominant, but 
a quick use of gprof would definately show one way or the other.

Cheers,

Benno
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to