Giter Site home page Giter Site logo

Comments (3)

ltratt avatar ltratt commented on July 17, 2024

Honest answer: I don't remember. I think "no" but I know I looked at this at some point, and I don't remember what I settled upon.

That said, in general I'd say that in LR parsing it's better to bubble results up then force mutation downwards. Flattening things (as in your example) is a common idiom https://softdevteam.github.io/grmtools/latest_release/book/parsing_idioms.html#define-a-flatten-function -- would that work?

from grmtools.

loewenheim avatar loewenheim commented on July 17, 2024

Yes, I think that would probably work. It has the minor flaw of allocating lots of individual vectors which are then concatenated, but I have no actual reason to think that it would pose a performance problem in practice.

from grmtools.

ltratt avatar ltratt commented on July 17, 2024

Informally, my experience is that unless you have very large inputs (or a very very large grammar), parsing performance tends to be a minor concern on modern machines. If however you do encounter problems, please shout!

from grmtools.

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.