in reply to Re^4: Pulling data out of { }
in thread Pulling data out of { }
The time is probably spent parsing the grammar,
Hmm. Seems not. I just put separate timings around the ->new and the ->parse and the former took just 1 second.
The other day I wanted to compare the time taken and resilience of our solutions. It doesn't matter a jot for the OPs application as there are a maximum of 26 drives, but I was interested in the comparative performance of my solution.
Rather than doing a full benchmark, I thought I'd just create a file with enough data that the timings came out in seconds. I tried mine against 676 records ('aa'..'zz'), but it was well under a second so I generated 17,576 records (<c>'aaa'..'zzz'/<c>) and it took around 5 seconds.
I then started your Parse::RecDescent solution against the same file and went off and did something else. When I returned, it had already consumed well over an hour of cpu and eventually finished having consumed 98 minutes of cpu on a quiescent system! So in 1 1/2 hours or so time I should get how long the parsing takes.
I know P::RD isn't the quickest thing on the block, but this difference is way greater than the last time I measured. There has to be something about this particular grammar that is causing it to go so slowly, but I'm not sufficiently familiar with P::RD to recognise what?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Pulling data out of { }
by ikegami (Patriarch) on Jan 17, 2006 at 06:08 UTC | |
by BrowserUk (Patriarch) on Jan 17, 2006 at 06:17 UTC |