Git Product home page Git Product logo

Comments (6)

igordejanovic avatar igordejanovic commented on August 20, 2024 1

First version of table caching is on the master branch. Please see the updates in the HISTORY.md and the docs. Please test with your code and let me know it you have any trouble.

from parglare.

igordejanovic avatar igordejanovic commented on August 20, 2024

Parser table serialization is something that I plan to do soon.

What have you tried to do and get slow parsing? Which parser did you use? LR or GLR? parglare is not optimized yet but for my use-cases is fast enough. Maybe you are using GLR and have a lot of non-determinism in the grammar so parglare builds a lot of trees, i.e. investigates a lot of possible interpretations. I can't help any further without more input.

from parglare.

KOLANICH avatar KOLANICH commented on August 20, 2024

I'm using LR for a grammar more complex than a simple expression language. In fact I have converted a LL(?) grammar (more than 200 lines) for CoCo/R into parglare one because it used some extensions I have not found in publicly available implementations of CoCo/R, such as "zero or more repeats". A try of "compile grammar" -> "gen parser" -> "test on file" pipeline takes nearly a minute with cpython on the hardware available to me at work (I remember that the CPU is some Celeron with SSE2, but without x86_64 ). There are some ambiguites, I know that I would have to use glr somewhen, but it is slow even in LR mode.

from parglare.

igordejanovic avatar igordejanovic commented on August 20, 2024

How big is the file you are parsing? For LR you should have at least 300Kb/sec more-less depending on the language. GLR has additional overhead and is at the moment approximately 5 times slower.

Can you publicly share your code, grammars, input files? If not can you do some measurements like time needed for the parser to initialize, parsing speed in Kb/sec.
I haven't yet optimized parglare extensively but I'm keeping an eye on performance so I would like to take a look.

from parglare.

KOLANICH avatar KOLANICH commented on August 20, 2024

importing a grammar takes 1.3 sec, generating a parser takes 154 sec .

from parglare.

igordejanovic avatar igordejanovic commented on August 20, 2024

Related to #52 and #36

from parglare.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.