Skip to content

Commit

Permalink
Updating benchmark to have proper indices
Browse files Browse the repository at this point in the history
  • Loading branch information
avoidwork committed Jan 31, 2017
1 parent c241e5d commit 053a4c7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions benchmark.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ const path = require("path"),
haro = require(path.join(__dirname, "lib", "haro.es6")),
precise = require("precise"),
nth = 15000,
data = [],
indexes = {};
data = [];

let indexes;

let i = -1;

while (++i < nth) {
data.push({id: i, name: "abba " + i});
indexes[i] = "abba" + i;
}

function second () {
Expand Down Expand Up @@ -40,6 +40,7 @@ function first () {
nth = 5;

console.log("testing time to 'find()' a record (first one is cold):");
indexes = store.dump("indexes");

while (++i < nth) {
(function () {
Expand Down

0 comments on commit 053a4c7

Please sign in to comment.