Description route data

This commit is contained in:
c9s 2014-05-16 19:18:47 +08:00
parent 184770358a
commit 88d485882a

View file

@ -60,6 +60,20 @@ r3 uses the same route path data for benchmarking, and here is the benchmark:
The matching speed of r3 is 527+ times faster than rails' trie router. The matching speed of r3 is 527+ times faster than rails' trie router.
### Route Paths
The route path generator is from <https://github.com/stevegraham/rails/pull/1>:
```ruby
#!/usr/bin/env ruby
arr = ["foo", "bar", "baz", "qux", "quux", "corge", "grault", "garply"]
paths = arr.permutation(3).map { |a| "/#{a.join '/'}" }
paths.each do |path|
puts "r3_tree_insert_path(n, \"#{path}\", NULL);"
end
```
Use case in PHP Use case in PHP
----------------------- -----------------------