Skip to content

Instantly share code, notes, and snippets.

@aslushnikov
Created February 11, 2015 13:42
Show Gist options
  • Save aslushnikov/fbd25ec7a90e8f87d526 to your computer and use it in GitHub Desktop.
Save aslushnikov/fbd25ec7a90e8f87d526 to your computer and use it in GitHub Desktop.
diff --git a/test/benchmarks.js b/test/benchmarks.js
index cf7673f..4b92449 100644
--- a/test/benchmarks.js
+++ b/test/benchmarks.js
@@ -37,7 +37,8 @@ fullFixture = [
'jQuery 1.9.1',
'YUI 3.12.0',
'jQuery.Mobile 1.4.2',
- 'Angular 1.2.5'
+ 'Angular 1.2.5',
+ 'big'
];
quickFixture = [
@@ -322,8 +323,8 @@ if (typeof window !== 'undefined') {
size = source.length;
totalSize += size;
return suite.add(filename, function () {
- var syntax = esprima.parse(source, { range: true, loc: true });
- tree.push(syntax.body.length);
+ var tokens = esprima.tokenize(source, { range: true, loc: true, saxCallback: new Function() });
+ tree.push(tokens.length);
}, {
'onComplete': function (event, bench) {
if (typeof gc === 'function') {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment