-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimization for matching a single array
- Loading branch information
1 parent
813f6b1
commit bbe4b47
Showing
15 changed files
with
685 additions
and
469 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/*jslint node: true */ | ||
"use strict"; | ||
|
||
var Qlobber = require('..').Qlobber, | ||
util = require("util"), | ||
common = require('./common'); | ||
|
||
function Matcher() | ||
{ | ||
Qlobber.call(this, { separator: "/", wildcard_one: "+" }); | ||
} | ||
|
||
util.inherits(Matcher, Qlobber); | ||
|
||
module.exports = function () | ||
{ | ||
var matcher = new Matcher(), i, j; | ||
|
||
for (i = 0; i < 60000; i += 1) | ||
{ | ||
for (j = 0; j < 5; j += 1) | ||
{ | ||
matcher.match('app/test/user/behrad/testTopic-' + j); | ||
matcher.add('app/test/user/behrad/testTopic-' + j, i); | ||
} | ||
} | ||
}; |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.