Skip to content

Switch away from std::regex to RE2 #14876

@Zaczero

Description

@Zaczero

Is your feature request related to a problem?

I've been interested in improving the Nix performance.

Proposed solution

Switch away from std::regex to RE2.

Alternative solutions

  • boost::regex (already installed)
  • Do nothing.

Additional context

I'm not C++ kind of guy.

I've been interested in improving the Nix performance and I noticed that std::regex is used quite frequently. When benchmarking I saw it puts quite noticeable amount of overhead whenever used. I confirmed my suspicion by searching around online e.g., here. In the past I had pleasant experience with working with RE2 because it's generally faster and safer to use. I suspect it may be a good fit for Nix.

Checklist


Add 👍 to issues you find important.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureFeature request or proposal

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions