From 4bc9be29276eec35ecfe094dc6e423c22e0f5a9e Mon Sep 17 00:00:00 2001 From: hugh fd jackson Date: Wed, 3 Apr 2013 23:49:16 +0100 Subject: [PATCH] Updated benchmarks to include poss for int strings --- benchmark/benchmarks.js | 2 +- benchmark/gen-keys.js | 8 ++++++++ benchmark/hashes.js | 10 +++++----- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/benchmark/benchmarks.js b/benchmark/benchmarks.js index f567896..ab3ff8a 100644 --- a/benchmark/benchmarks.js +++ b/benchmark/benchmarks.js @@ -54,7 +54,7 @@ var suites = [ // hash(5000), // hash(10000), // hash(50000), - // hash(100000), + // hash(100000) ] _.each(suites, run) diff --git a/benchmark/gen-keys.js b/benchmark/gen-keys.js index 5b208db..e4e61bc 100644 --- a/benchmark/gen-keys.js +++ b/benchmark/gen-keys.js @@ -25,8 +25,16 @@ var makeWord = function(){ return repeat(randInt(10), function(){ return choose(chars) }).join('') } +var makeInt = function(){ + var len = randInt(10) + return repeat(len, function(){ return randInt(9) }).join('') +} + module.exports = { words: function(len){ return repeat(len, makeWord) + }, + ints: function(len){ + return repeat(len, makeInt) } } diff --git a/benchmark/hashes.js b/benchmark/hashes.js index 91a5e13..53b9a6a 100644 --- a/benchmark/hashes.js +++ b/benchmark/hashes.js @@ -43,9 +43,9 @@ var zobel = function(str){ module.exports = { djb2: require('string-hash'), - java: require('../src/hash').hash, - 'bad java': rubbishJava, - chash: function(key){ return chash(key, max32bit) }, - sedgewick: sedgewick, - zobel: zobel + java: require('../src/hash').hash + // 'bad java': rubbishJava, + // chash: function(key){ return chash(key, max32bit) }, + // sedgewick: sedgewick, + // zobel: zobel }