Skip to content

Commit 00d3f44

Browse files
committed
Add benchmark for separate U.S. counties.
1 parent 736cad7 commit 00d3f44

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

test/geo/benchmark.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,17 @@ for (var i = 0, k = 0; i < n * 1000; i++, k++) {
1919

2020
console.log("Single circle: " + formatNumber((Date.now() - then) / k) + "ms/op.");
2121

22+
o = JSON.parse(fs.readFileSync("./test/data/us-counties.json")).features;
23+
then = Date.now();
24+
25+
for (var i = 0, k = 0; i < n; i++, k++) {
26+
for (var j = 0, m = o.length; j < m; ++j) {
27+
path(o[j]);
28+
}
29+
}
30+
31+
console.log("U.S. counties (separate): " + formatNumber((Date.now() - then) / k) + "ms/op.");
32+
2233
o = JSON.parse(fs.readFileSync("./test/data/us-counties.json"));
2334
then = Date.now();
2435

0 commit comments

Comments
 (0)