Also reduced the count of entries of the max iteration to 25. The main
issue that we're trying to solve right now is which approach is the best
with a small number of entries. Going up to 100 takes a loooong time,
and all of the dictionary-based approaches scale well above 10 or so
entries.
* Introduce RoutePattern
Introduces RoutePattern - a new parser and representation for routing
templates, defaults, and constraints.
This is a new representation for all of the 'inputs' to routing that is
immutable and captures 'out of line' information for defaults and
constraints.
This will allow us to unify the handling of constraints and values from
attribute style routes and conventional style routes.
* Add benchmarks for RVD
There are the scenarios that are critical for URL matching performance.
* Reimplement RouteValueDictionary
Improves the scenarios with benchmarks by about 30%
* Fix benchmark
* PR feedback
* More feedback and tests
This is a code dump of existing tests for TemplateMatcher and TreeRouter
converted to the format of matcher conformance tests.
Note that most of the new tests aren't yet supported by our experimental
matchers, which don't support many of these advanced features.
The instruction matcher was missing a few details, which made it faster
than it should have been. Right now I'm trying to keep the design of
these in sync. Once I fixed that it exposed a legitimate bug that was
blocking the github benchmark.
This change improves this area a bit by consolidating the matcher
implementations between the benchmarks project and the conformance
tests.
Additionally I split the minimal matcher into a really trivial
implementation for the simple tests and a more complex one for the
larger tests. This allows us to keep the plaintext/techempower scenario
in sight while also having a good baseline for the more sophisticated
tests.
Also starting to add tests that verify that matchers behave as expected.
The matchers now successfully execute all of these benchmarks, which
means that they support literals and parameters.
Missing features:
- complex segments
- catchall
- default values
- optional parameters
- constraints
- complex segments with file extensions
This is a good place to iterate a bit more of perf and try to make a
decision about what we want to implement.
Here's a code dump of the parts of the Dispatcher prototype codebase
that are needed to get us off the ground.
This first cut attempts to use part of routing where possible, and not
all of those changes will be long-lasting.
I'll leave comments through thoughout the PR for education.