Skip to content

Instantly share code, notes, and snippets.

@moznion
Created March 17, 2015 14:58
Show Gist options
  • Save moznion/4cfb51158548a1d0691a to your computer and use it in GitHub Desktop.
Save moznion/4cfb51158548a1d0691a to your computer and use it in GitHub Desktop.
package me.geso.routes;
import java.util.LinkedHashMap;
public class PathRouteBench {
public void benchPathRoute() {
for (int i = 0; i < 1_000_000; ++i) {
PathRoute<String> route = new PathRoute<String>("/foo/*", "Detail");
LinkedHashMap<String, String> captured = new LinkedHashMap<>();
boolean matched = route.match("/foo/bar/baz", captured);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment