Regex is comically slow. High performance alternatives? (Pattern matching for validation)

This page summarizes the projects mentioned and recommended in the original post on /r/cpp_questions

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • compile-time-regular-expressions

    Compile Time Regular Expression in C++

  • regex-performance

    Performance comparison of regular expression engines. (by HFTrader)

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

  • Vehicle_Rental

    c++ practice

    https://github.com/Riverside96/Vehicle_Rental if it's of any interest, don't judge the lack of references, I'll get to that. It's early days. Theres only 2 really short regex & it's literally taking 10 seconds to compile with g++ with this run command cpp = "cd $dir && g++ *.cpp -o run && ./run",

  • RE2

    RE2 is a fast, safe, thread-friendly alternative to backtracking regular expression engines like those used in PCRE, Perl, and Python. It is a C++ library.

    Take a look at Google's RE2: https://github.com/google/re2

  • cmake-init-shared-static

    Example static/shared library output of cmake-init

    AFAIK "packaging" in this context refers to writing your CMake code in a way that enables your library to be properly put into package managers and exporting the proper pkg config and whatever else files so it can actually be found by other tools. And this part can get a bit annoying and CMake's shitty DSL isn't exactly helping. Just take a look at https://github.com/friendlyanon/cmake-init-shared-static/blob/master/cmake/install-rules.cmake , and that's just a simple example.

  • meson-vcpkg

    Example to run vcpkg from within meson

    Technically there is a better way (https://github.com/Neumann-A/meson-vcpkg) but since I prefer the "global" mode of vcpkg for my personal projects I prefer this hack. I never need different versions of the same library for different projects (everything just gets the latest) so manifest mode would just waste disk space and install time. Same reason why I have not yet bothered to check out Conan since that is always in manifest mode. It does have Meson integration though and people are using those together so that's an option too, I just have no personal experience with that.

  • cmake-init

    The missing CMake project initializer

    Check out: https://github.com/friendlyanon/cmake-init

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts