Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: rust-lang/regex
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 5fcca367aa92e6deee4d18452151c3da9acef500
Choose a base ref
...
head repository: rust-lang/regex
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 6c5158e300062e78a276ee2c3767801c3156b745
Choose a head ref
  • 1 commit
  • 10 files changed
  • 1 contributor

Commits on Mar 24, 2018

  1. Add support for C++ boost::regex to benchmarks

    This is very similar to the `std::regex` benchmark implementation since Boost.Regex and `std::regex` have very similar APIs and regex grammar support. As such, it uses the `stdcpp` Rust and C FFIs to reduce code duplication.
    
     * bench/Cargo.toml: add `re-boost` feature
     * bench/build.rs: add `cboost` library to bench build. This uses a compiler preprocessor definition to indicate whether or not to use Boost when compiling the `stdcpp` FFI.
     * bench/compile: add `re-boost` feature to bench compile script
     * bench/run: add `re-boost` feature to bench run script
     * bench/src/bench.rs: use `ffi::stdcpp::Regex`, define its `text!` macro, and `Text` type for feature `re-boost`
     * bench/src/ffi/mod.rs: declare `stdcpp` module for `re-boost` feature
     * bench/src/ffi/stdcpp.cpp: implement C API using C++ `boost::regex`. The Boost.Regex API is very similar to the `std::regex` API and therefore only uses a different namespace.
     * bench/src/main.rs: add boost to bench main
     * bench/src/misc.rs:
        - do not run `match_class_unicode` benchmark for `re-boost` feature because `boost::regex` ECMAScript grammar does not support unicode character classes
     * bench/src/sherlock.rs:
        - do not run `letters`, `letters_upper`, and `letters_lower` benchmarks for `re-boost` feature because `boost::regex` ECMAScript grammar does not support unicode character classes
        - use a different regex for `everything_greedy` benchmark because `boost::regex` '.' does not match '\r'
        - `words` benchmark for `boost::regex` matches RE2 test result, so use that test for `re-boost` feature as well. Also fixes conditional compilation issue for `re-stdcpp`.
        - do not run `holmes_coword_watson` benchmark for `re-boost` feature because Boost.Regex implementation currently seems to have exponential behavior here
    mkrupcale committed Mar 24, 2018
    Configuration menu
    Copy the full SHA
    6c5158e View commit details
    Browse the repository at this point in the history
Loading