persistent-hash-trie
Advanced tools
Comparing version 0.4.1 to 0.4.2
@@ -6,2 +6,3 @@ 'use strict' | ||
var versions = require('./versions') | ||
var mori = require('mori') | ||
@@ -12,3 +13,3 @@ var makeSuite = function(quantity){ | ||
var test = function(o){ | ||
var addTest = function(o){ | ||
var name = o.name | ||
@@ -26,4 +27,13 @@ var p = o.module | ||
_.each(versions, test) | ||
_.each(versions, addTest) | ||
// mori benchmark | ||
var moriMap = _.reduce(keys, function(map, key){ | ||
return mori.assoc(map, key, true) | ||
}, mori.hash_map()) | ||
suite.add('mori', function(){ | ||
mori.assoc(moriMap, 'key', 'val') | ||
}) | ||
return suite | ||
@@ -30,0 +40,0 @@ } |
@@ -36,26 +36,26 @@ 'use strict' | ||
mutable(1), | ||
mutable(10), | ||
mutable(100), | ||
mutable(1000), | ||
// mutable(1), | ||
// mutable(10), | ||
// mutable(100), | ||
// mutable(1000), | ||
keys(1), | ||
keys(10), | ||
keys(100), | ||
keys(1000) | ||
// keys(1), | ||
// keys(10), | ||
// keys(100), | ||
// keys(1000) | ||
// hash(1), | ||
// hash(3), | ||
// hash(5), | ||
// hash(10), | ||
// hash(50), | ||
// hash(100), | ||
// hash(500), | ||
// hash(1000), | ||
// hash(5000), | ||
// hash(10000), | ||
// hash(50000), | ||
// hash(100000) | ||
// hash(1), | ||
// hash(3), | ||
// hash(5), | ||
// hash(10), | ||
// hash(50), | ||
// hash(100), | ||
// hash(500), | ||
// hash(1000), | ||
// hash(5000), | ||
// hash(10000), | ||
// hash(50000), | ||
// hash(100000) | ||
] | ||
_.each(suites, run) |
@@ -6,2 +6,3 @@ 'use strict' | ||
var versions = require('./versions') | ||
var mori = require('mori') | ||
@@ -12,3 +13,3 @@ var makeSuite = function(quantity){ | ||
var test = function(o){ | ||
var addTest = function(o){ | ||
var name = o.name | ||
@@ -28,4 +29,14 @@ var p = o.module | ||
_.each(versions, test) | ||
_.each(versions, addTest) | ||
// mori benchmark | ||
var moriMap = _.reduce(keys, function(map, key){ | ||
return mori.assoc(map, key, true) | ||
}, mori.hash_map()) | ||
suite.add('mori', function(){ | ||
mori.dissoc(moriMap, 'key', 'val') | ||
}) | ||
return suite | ||
@@ -32,0 +43,0 @@ } |
@@ -6,2 +6,3 @@ 'use strict' | ||
var versions = require('./versions') | ||
var mori = require('mori') | ||
@@ -12,3 +13,3 @@ var makeSuite = function(quantity){ | ||
var test = function(o){ | ||
var addTest = function(o){ | ||
var name = o.name | ||
@@ -27,3 +28,13 @@ var p = o.module | ||
_.each(versions, test) | ||
_.each(versions, addTest) | ||
// mori benchmark | ||
var moriMap = _.reduce(keys, function(map, key){ | ||
return mori.assoc(map, key, true) | ||
}, mori.hash_map()) | ||
suite.add('mori', function(){ | ||
mori.get(moriMap, 'key', 'val') | ||
}) | ||
return suite | ||
@@ -30,0 +41,0 @@ } |
@@ -6,3 +6,3 @@ 'use strict' | ||
var versions = require('./versions') | ||
var mori = require('mori') | ||
var makeSuite = function(quantity){ | ||
@@ -28,2 +28,11 @@ var suite = new require('benchmark').Suite('has property with Trie of ' + quantity) | ||
// mori benchmark | ||
var moriMap = _.reduce(keys, function(map, key){ | ||
return mori.assoc(map, key, true) | ||
}, mori.hash_map()) | ||
suite.add('mori', function(){ | ||
mori.has_key(moriMap, 'key', 'val') | ||
}) | ||
return suite | ||
@@ -30,0 +39,0 @@ } |
{ | ||
"name": "persistent-hash-trie", | ||
"description": "Pure string:val storage, using structural sharing", | ||
"version": "0.4.1", | ||
"version": "0.4.2", | ||
"main": "src/persistent-hash-trie.js", | ||
@@ -20,3 +20,4 @@ "scripts": { | ||
"string-hash": "1.1.0", | ||
"format-number": "0.0.0" | ||
"format-number": "0.0.0", | ||
"mori": "0.2.0" | ||
}, | ||
@@ -23,0 +24,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
136
156234
8
70
3497