Giter Site home page Giter Site logo

Parse functions in parameters about soma-template HOT 1 OPEN

uiii avatar uiii commented on June 30, 2024
Parse functions in parameters

from soma-template.

Comments (1)

soundstep avatar soundstep commented on June 30, 2024

So There's a "issue-5" branch where I've enabled parsing function in parameters.

It works, however the regex to extract the params is a lot more complex.

https://github.com/soundstep/soma-template/blob/issue-5/src/2.settings.js#L76
versus
https://github.com/soundstep/soma-template/blob/master/src/2.settings.js#L75

That makes the lib slightly slower, even if you don't it as this regex is used constantly.

Master benchmarks:

  • render text node x 23,706 ops/sec ±1.77% (74 runs sampled)

Issue-5 benchmarks:

  • render text node x 21,470 ops/sec ±1.76% (90 runs sampled)

Benchmarks are on the repo:
https://github.com/soundstep/soma-template/tree/master/benchmarks

I need to finish to write the tests for the regex on issue-5, but as there are other solutions by passing only parameters, I'm not sure I'll add this functionality if I don't find a way to optimize and get performance.

I'll think about it.

from soma-template.

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.