[erlang-questions] speed of neotoma parser
Joe Armstrong
erlang@REDACTED
Fri Nov 13 21:25:22 CET 2015
PEG parsers are notoriously inefficient. How about having a separate
tokenization pass, and parse token instead of characters. At a guess
this would be far faster since you'd backtrack over completed tokens
rather than characters.
/Joe
On Fri, Nov 13, 2015 at 3:02 PM, Sean Cribbs <seancribbs@REDACTED> wrote:
> Max,
>
> Do you have a link to your grammar? I can probably poke at it and give you
> some tips.
>
> However, I am well aware of performance problems with neotoma -- with large
> grammars or large inputs it drags. Yes, there are general problems for PEGs
> in Erlang, but its current implementation is particularly naive and
> wasteful. I'm working on a rewrite, but it's a complete overhaul (and more
> faithful to the thesis and reference implementation "Pappy"). Since it's not
> core to my day-job, I've only been able to work on the rewrite occasionally
> in my free time.
>
> On Thu, Nov 12, 2015 at 12:07 PM, Max Lapshin <max.lapshin@REDACTED> wrote:
>>
>> Yes, Louis, I also think that there may be a simple way of speeding it up.
>>
>> I'm only afraid that I will have to open my university book and remember
>> what LL-1 means and how it differs from LALR =)
>>
>> Ok, will try to profile it first.
>>
>> _______________________________________________
>> erlang-questions mailing list
>> erlang-questions@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-questions
>>
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
More information about the erlang-questions
mailing list