Re: Qi Symbols parser performance
Stephan Menzel <[email protected]> Fri, 12 Jan 2018 17:22:53 +0100
| Newsgroups | gmane.comp.parsers.spirit.general |
|---|---|
| Message-ID | <CAEQ568tbpMWpSHYwfug94hEDkViZpSwsqOZFr6hqMhCYfaS7aw@mail.gmail.com> |
Hello Joel, thanks for your response! On Fri, Jan 12, 2018 at 4:49 PM, Joel de Guzman <[email protected]> wrote: > 1) Why use grammars and rules? Those are unnecessary. You can use > symbols directly. > Well, yes, I know. I have been using spirit for so many years, that's just the way I use it because that was how I learned it back then. I suppose that wouldn't explain a difference of this magnitude though. I will still test this without the grammar to rule out overhead brought in this way. > 2) Symbols use ternary search tries: http://tinyurl.com/ydy3fnnp > 3) They might not be the best choice for your use case. They are best > used for parsing languages, especially when you expect lots of partial > matches and misses (e.g. keywords in a language, where you expect other > lexemes apart from just keywords. > > The way I understand that order is not that different from how an rb-tree would order a map now, is it? Which is why I brought this up. No matter how bad a choice the used datastructure would be, shouldn't it still _not_ be outperformed by a blank unordered list of strings which are compared one after the other, doing the lowercasing each time? Cheers, Stephan ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Spirit-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/spirit-general