Skip to content

Commit 3ed0458

Browse files
committed
update benchmarks
1 parent 2bd4995 commit 3ed0458

File tree

12 files changed

+22
-17
lines changed

12 files changed

+22
-17
lines changed

benchmark/code/with-cache.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
'use strict';
2+
3+
var cache = require('../..');
4+
var fn = require('../../support.js');
5+
6+
module.exports = function(str, opts) {
7+
return cache(fn.toRegex, str, opts).exec('a abc foo xyz fooabc ab');
8+
};

benchmark/code/with.js

Lines changed: 0 additions & 8 deletions
This file was deleted.

benchmark/code/without-cache.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
'use strict';
2+
3+
var fn = require('../../support.js');
4+
5+
module.exports = function(str, opts) {
6+
return fn.toRegex(str, opts).exec('a abc foo xyz fooabc ab');
7+
};

benchmark/code/without.js

Lines changed: 0 additions & 7 deletions
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = [];

benchmark/fixtures/no-options.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

benchmark/fixtures/options-one.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = [{ a: true }];

benchmark/fixtures/options-six.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = [{ a: true, b: true, c: true, x: true, y: true, z: true }];

benchmark/fixtures/options-two.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = [{ a: true, b: true }];
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = ['foo', { a: true, b: true, c: true, x: true, y: true, y: true }];

0 commit comments

Comments
 (0)