Permalink
Browse files

Use ua-parser's dedicated method for benchmarking the UA parser.

    
Fix benchmark data accordingly.
  • Loading branch information...
1 parent 4adf3de commit 6e99f3bcd1102055d6957845fcb3c2d3295360a5 @tobie tobie committed Jan 11, 2013
Showing with 6 additions and 6 deletions.
  1. +4 −4 README.md
  2. +1 −1 benchmark/dict.js
  3. +1 −1 benchmark/run.js
View
@@ -26,16 +26,16 @@ engineering effort has been worth it as [this benchmark shows][benchmark]:
Starting the benchmark, parsing 62 useragent strings per run
Executed benchmark against node module: "useragent"
-Count (49), Cycles (4), Elapsed (5.531), Hz (946.8647887795141)
+Count (61), Cycles (5), Elapsed (5.559), Hz (1141.3739447904327)
Executed benchmark against node module: "useragent_parser"
-Count (25), Cycles (2), Elapsed (5.359), Hz (463.63241573609633)
+Count (29), Cycles (3), Elapsed (5.448), Hz (545.6817291171243)
Executed benchmark against node module: "useragent-parser"
-Count (13), Cycles (4), Elapsed (5.468), Hz (246.70547120951275)
+Count (16), Cycles (4), Elapsed (5.48), Hz (304.5373431830105)
Executed benchmark against node module: "ua-parser"
-Count (13), Cycles (3), Elapsed (5.481), Hz (243.57388988788998)
+Count (54), Cycles (3), Elapsed (5.512), Hz (1018.7561434659247)
Module: "useragent" is the user agent fastest parser.
```
View
@@ -56,7 +56,7 @@ froomfroom
})
.add('ua-parser', function () {
for (var i = 0; i < length; i++ ) {
- uaparser.parse(testcases[i]);
+ uaparser.parseUA(testcases[i]);
}
})
.on('cycle', function (event) {
View
@@ -50,7 +50,7 @@ froomfroom
})
.add('ua-parser', function () {
for (var i = 0; i < length; i++ ) {
- uaparser.parse(testcases[i]);
+ uaparser.parseUA(testcases[i]);
}
})
.on('cycle', function (event) {

0 comments on commit 6e99f3b

Please sign in to comment.