Re: Design/structure X3 parser more like Qi parser
Larry Evans <[email protected]>
| Newsgroups | gmane.comp.parsers.spirit.general |
|---|---|
| Message-ID | <[email protected]> |
On 12/13/2016 11:56 AM, Seth wrote: > On 12-12-16 13:17, Sandro Pirkwieser wrote: >> Since for each of the given input strings the Qi parser peforms better, I'm wondering whether the "translation" from Qi to X3 is correct and what is causing this rather unexpected result. > First, on the performance. I agree that it disappoints. I'd rate that a > regression. It appears as though `parse_into_container` involves a lot > of redundant copying where Qi doesn't do that. Anyone who can have a > look at that, please use my version (linked) below, which is A LOT > cleaner but doesn't perform significantly better. [snip] > The code cleanup can be found at > > git clone https://gist.github.com/7dc223f00d8cc46d8be566756b7fdf03.git > > After cleanup, the Qi version is still a lot faster > <http://stackoverflow-sehe.s3.amazonaws.com/e44a2c1d-356f-4773-bb51-22d307621a29/stats.html>. > I want to make sure I'm reading that graph correctly. It says that the average time using 'x3 new' is 870,000 ns; whereas the average time using 'qi dynamic' is only 137 ns? BTW, thanks doing this :) -regards, Larry ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot