Giter Club home page Giter Club logo

Comments (1)

Morgul avatar Morgul commented on September 15, 2024

I wonder if it's related to this:

pegjs/pegjs#237

So, for the moment, I'm not that worried, since we have the ability to store a parsed tree, and call it as many times as we want to get unique output values. However, I'll have to make it clear in the documentation that for performance reasons, users will want to cache parsed rolls.

Hmm. Also might need to check Variable, and make sure it updates if the scope changes between eval calls.

Might even consider shipping a built-in cache, if performance is going to be poor enough. Thanks for finding this; we should probably build a small benchmarking util (can even run it between versions and store that off) and come up with as many real-worldish strings as possible to test. If we can handle, say most of the rolls from D&D 5e, 4e, and 3.5e without caching, then we're probably fine.

(I have a half dozen 4e and 3.5e characters stored in sqlite with their roll texts; I can scrape some of that for this. We might have to build the rest by hand. Off the top of my head, I don't remember which class/spell/power has the largest, weirdest ruleset.)

from rpgdice.

Related Issues (6)

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.