GithubHelp home page GithubHelp logo

Comments (2)

progsource avatar progsource commented on August 21, 2024 1

I tried out adding re2 and there are mainly 2 issues I see currently with it:

  1. It does not support (?!re) | before text not matching re (NOT SUPPORTED) (see https://github.com/google/re2/wiki/Syntax). With this it does not support how the regex for strong, italic, strikethrough and emphasized is written. There might be a possible regex combination that makes it then still work, but my main problem with this is, that it supports less regex functionality, which can result in a limit for possible future development.
  2. It is not header only, while maddy is a header only library. Therefor it blows up the library quiet a bit - also considering the requirement of including abseil. I tried it though with making a compiler flag which worked, so that it could be a possible option. This way one could still have the header only version.

In my tests the speed improvement wasn't that significant visible in the benchmarks. This might have multiple reasons and does not neccessarily mean, that it is not possible to gain more speed with re2 in the end.

I understand, that it would be nice, if maddy was faster and I still have an idea how to make that happen (own lexer/parser without regex) - but that will require basically a rewrite and I do consider it for maddy 2.0 at some point. Don't know yet though when I can get to that.

from maddy.

progsource avatar progsource commented on August 21, 2024

That sounds like a good idea. re2 also seems to have a good license. maddy has to stay functioning on the three major platforms and should not require something like boost, but as far as I can see, https://github.com/google/re2 is providing these requirements.

If we switch out to a different library to improve performance, it also has to be proven to be faster (like with Google Benchmark or something like that).
I don't know yet when I will find the time to work on this. But I'm always open to PRs for that matter ;)

from maddy.

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.