Re: How would I optimize this parser?

2010-11-02 Thread T.D.Spenser
I'll reply to several posts at once. The code comments you quoted weren't meant as a criticism. They are mostly notes to myself in case I want to document my learning experience with D on some personal website no one ever visits. I'll post criticisms separately if/when I have any. :) When I was s

Re: How would I optimize this parser?

2010-10-31 Thread T.D.Spenser
== Quote from bearophile (bearophileh...@lycos.com)'s article > T.D.Spenser: > > Unfortunately, it's quite slow. Can anyone point out what might be the > > issue(s)? > Very good :-) > First suggestions: > - Generally compile your D code using the -w switch (y

How would I optimize this parser?

2010-10-30 Thread T.D.Spenser
I wrote a simple parser in D. The language for it looks like this: [tagName content content [childTagName] [childTagName more content]] The parser is here: http://thoughtdispenser.net/files/parser.d Unfortunately, it's quite slow. Can anyone point out what might be the issue(s)? begin 644 parse