cljs-persistent-hash-map-miniscule-assoc

JavaScript performance comparison

Test case created by Michał Marczyk

Info

ClojureScript PersistentHashMap performance test: assoc 6 elements onto a map.

See CLJS-178.

For a readable version of the preparation code see https://github.com/michalmarczyk/cljs-persistent-hash-map-test.

Preparation code

<script>
function c(a){throw a;}var g=!0,j=null,l=!1;function aa(){return function(a){return a}}function m(a){return function(){return this[a]}}function n(a){return function(){return a}}var o,ba=this;
function p(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var d=Object.prototype.toString.call(a);if("[object Window]"==d)return"object";if("[object Array]"==d||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==d||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";
else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function r(a){return void 0!==a}function ca(a){return"string"==typeof a}function da(a){return a[ea]||(a[ea]=++fa)}var ea="closure_uid_"+Math.floor(2147483648*Math.random()).toString(36),fa=0;function s(a,b){var d=a.split("."),e=ba;!(d[0]in e)&&e.execScript&&e.execScript("var "+d[0]);for(var f;d.length&&(f=d.shift());)!d.length&&r(b)?e[f]=b:e=e[f]?e[f]:e[f]={}};var ga={"\x00":"\\0","\u0008":"\\b","\u000c":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\u000b":"\\x0B",'"':'\\"',"\\":"\\\\"},ha={"'":"\\'"};
function ia(a){var q;a=""+a;if(a.quote)return a.quote();for(var b=['"'],d=0;d<a.length;d++){var e=a.charAt(d),f=e.charCodeAt(0),h=b,i=d+1,k;if(!(k=ga[e])){if(!(31<f&&127>f))if(e in ha)e=ha[e];else if(e in ga)q=ha[e]=ga[e],e=q;else{f=e;k=e.charCodeAt(0);if(31<k&&127>k)f=e;else{if(256>k){if(f="\\x",16>k||256<k)f+="0"}else f="\\u",4096>k&&(f+="0");f+=k.toString(16).toUpperCase()}e=ha[e]=f}k=e}h[i]=k}b.push('"');return b.join("")}
function ja(a){for(var b=0,d=0;d<a.length;++d)b=31*b+a.charCodeAt(d),b%=4294967296;return b};function ka(a,b,d){for(var e in a)b.call(d,a[e],e,a)}function la(a){var b={},d;for(d in a)b[d]=a[d];return b};var ma;(ma="ScriptEngine"in ba&&"JScript"==ba.ScriptEngine())&&(ba.ScriptEngineMajorVersion(),ba.ScriptEngineMinorVersion(),ba.ScriptEngineBuildVersion());function na(a,b){this.l=ma?[]:"";a!=j&&this.append.apply(this,arguments)}ma?(na.prototype.X=0,na.prototype.append=function(a,b,d){b==j?this.l[this.X++]=a:(this.l.push.apply(this.l,arguments),this.X=this.l.length);return this}):na.prototype.append=function(a,b,d){this.l+=a;if(b!=j)for(var e=1;e<arguments.length;e++)this.l+=arguments[e];return this};na.prototype.clear=function(){ma?this.X=this.l.length=0:this.l=""};
na.prototype.toString=function(){if(ma){var a=this.l.join("");this.clear();a&&this.append(a);return a}return this.l};function t(a){return a!=j&&a!==l}function oa(a,b){var d=a[p.call(j,b)];if(t(d))return d;d=a._;return t(d)?d:l}function u(a,b){return Error("No protocol method "+a+" defined for type "+p.call(j,b)+": "+b)}function w(a){return Array.prototype.slice.call(a)}function pa(a){return Array(a)}function x(a){if(a?a.B:a)a=a.B(a);else{var b;var d=x[p.call(j,a)];d?b=d:(d=x._)?b=d:c(u.call(j,"ICounted.-count",a));a=b.call(j,a)}return a}
function y(a,b){var d;if(a?a.v:a)d=a.v(a,b);else{var e=y[p.call(j,a)];e?d=e:(e=y._)?d=e:c(u.call(j,"ICollection.-conj",a));d=d.call(j,a,b)}return d}
var z=function(){function a(a,b,d){if(a?a.Z:a)a=a.Z(a,b,d);else{var i;var k=z[p.call(j,a)];k?i=k:(k=z._)?i=k:c(u.call(j,"IIndexed.-nth",a));a=i.call(j,a,b,d)}return a}function b(a,b){var d;if(a?a.Y:a)d=a.Y(a,b);else{var i=z[p.call(j,a)];i?d=i:(i=z._)?d=i:c(u.call(j,"IIndexed.-nth",a));d=d.call(j,a,b)}return d}var d=j,d=function(e,d,h){switch(arguments.length){case 2:return b.call(this,e,d);case 3:return a.call(this,e,d,h)}c("Invalid arity: "+arguments.length)};d.f=b;d.g=a;return d}(),ra={};
function sa(a){if(a?a.C:a)a=a.C(a);else{var b;var d=sa[p.call(j,a)];d?b=d:(d=sa._)?b=d:c(u.call(j,"ISeq.-first",a));a=b.call(j,a)}return a}function ta(a){if(a?a.D:a)a=a.D(a);else{var b;var d=ta[p.call(j,a)];d?b=d:(d=ta._)?b=d:c(u.call(j,"ISeq.-rest",a));a=b.call(j,a)}return a}
var A=function(){function a(a,b,d){if(a?a.S:a)a=a.S(a,b,d);else{var i;var k=A[p.call(j,a)];k?i=k:(k=A._)?i=k:c(u.call(j,"ILookup.-lookup",a));a=i.call(j,a,b,d)}return a}function b(a,b){var d;if(a?a.R:a)d=a.R(a,b);else{var i=A[p.call(j,a)];i?d=i:(i=A._)?d=i:c(u.call(j,"ILookup.-lookup",a));d=d.call(j,a,b)}return d}var d=j,d=function(d,f,h){switch(arguments.length){case 2:return b.call(this,d,f);case 3:return a.call(this,d,f,h)}c("Invalid arity: "+arguments.length)};d.f=b;d.g=a;return d}();
function ua(a,b,d){if(a?a.Q:a)a=a.Q(a,b,d);else{var e;var f=ua[p.call(j,a)];f?e=f:(f=ua._)?e=f:c(u.call(j,"IAssociative.-assoc",a));a=e.call(j,a,b,d)}return a}var va={};function wa(a,b){var d;if(a?a.W:a)d=a.W(a,b);else{var e=wa[p.call(j,a)];e?d=e:(e=wa._)?d=e:c(u.call(j,"IMap.-dissoc",a));d=d.call(j,a,b)}return d}var ya={},za={};function Aa(a){if(a?a.r:a)a=a.d;else{var b;var d=Aa[p.call(j,a)];d?b=d:(d=Aa._)?b=d:c(u.call(j,"IMeta.-meta",a));a=b.call(j,a)}return a}
function Ba(a,b){var d;if(a?a.s:a)d=a.s(a,b);else{var e=Ba[p.call(j,a)];e?d=e:(e=Ba._)?d=e:c(u.call(j,"IWithMeta.-with-meta",a));d=d.call(j,a,b)}return d}
var B=function(){function a(a,b,d){if(a?a.ba:a)a=a.ba(a,b,d);else{var i;var k=B[p.call(j,a)];k?i=k:(k=B._)?i=k:c(u.call(j,"IReduce.-reduce",a));a=i.call(j,a,b,d)}return a}function b(a,b){var d;if(a?a.aa:a)d=a.aa(a,b);else{var i=B[p.call(j,a)];i?d=i:(i=B._)?d=i:c(u.call(j,"IReduce.-reduce",a));d=d.call(j,a,b)}return d}var d=j,d=function(d,f,h){switch(arguments.length){case 2:return b.call(this,d,f);case 3:return a.call(this,d,f,h)}c("Invalid arity: "+arguments.length)};d.f=b;d.g=a;return d}();
function Ca(a,b){var d;if(a?a.j:a)d=a.j(a,b);else{var e=Ca[p.call(j,a)];e?d=e:(e=Ca._)?d=e:c(u.call(j,"IEquiv.-equiv",a));d=d.call(j,a,b)}return d}function Da(a){if(a?a.q:a)a=a.q(a);else{var b;var d=Da[p.call(j,a)];d?b=d:(d=Da._)?b=d:c(u.call(j,"IHash.-hash",a));a=b.call(j,a)}return a}function Ea(a){if(a?a.o:a)a=a.o(a);else{var b;var d=Ea[p.call(j,a)];d?b=d:(d=Ea._)?b=d:c(u.call(j,"ISeqable.-seq",a));a=b.call(j,a)}return a}var Fa={},Ga={};
function C(a,b){var d;if(a?a.k:a)d=a.k(a,b);else{var e=C[p.call(j,a)];e?d=e:(e=C._)?d=e:c(u.call(j,"IPrintable.-pr-seq",a));d=d.call(j,a,b)}return d}
var H=function(){function a(a,b){return Ca.call(j,a,b)}var b=j,d=function(){function a(d,e,k){var q=j;r(k)&&(q=D(Array.prototype.slice.call(arguments,2),0));return b.call(this,d,e,q)}function b(a,d,e){for(;;)if(t(Ca.call(j,a,d)))if(t(E.call(j,e)))a=d,d=F.call(j,e),e=E.call(j,e);else return Ca.call(j,d,F.call(j,e));else return l}a.e=2;a.a=function(a){var d=F(a),e=F(E(a)),a=G(E(a));return b.call(this,d,e,a)};return a}(),b=function(b,f,h){switch(arguments.length){case 1:return g;case 2:return a.call(this,
b,f);default:return d.apply(this,arguments)}c("Invalid arity: "+arguments.length)};b.e=2;b.a=d.a;b.w=n(g);b.f=a;b.g=d;return b}();Da["null"]=n(0);A["null"]=function(){return function(a,b,d){switch(arguments.length){case 2:return j;case 3:return d}c("Invalid arity: "+arguments.length)}}();ua["null"]=function(a,b,d){return Ha.call(j,b,d)};y["null"]=function(a,b){return I.call(j,b)};
B["null"]=function(){return function(a,b,d){switch(arguments.length){case 2:return b.call(j);case 3:return d}c("Invalid arity: "+arguments.length)}}();Ga["null"]=g;C["null"]=function(){return I.call(j,"nil")};x["null"]=n(0);ra["null"]=g;sa["null"]=n(j);ta["null"]=function(){return I.call(j)};Ca["null"]=function(a,b){return b===j};Ba["null"]=n(j);za["null"]=g;Aa["null"]=n(j);z["null"]=function(){return function(a,b,d){switch(arguments.length){case 2:return j;case 3:return d}c("Invalid arity: "+arguments.length)}}();
va["null"]=g;wa["null"]=n(j);Date.prototype.j=function(a,b){return a.toString()===b.toString()};Da.number=aa();Ca.number=function(a,b){return a===b};Da["boolean"]=function(a){return a===g?1:0};Da["function"]=function(a){return da.call(j,a)};
var Ia=function(){function a(a,b,d,e){for(;;)if(e<x.call(j,a))d=b.call(j,d,z.call(j,a,e)),e+=1;else return d}function b(a,b,d){for(var e=0;;)if(e<x.call(j,a))d=b.call(j,d,z.call(j,a,e)),e+=1;else return d}function d(a,b){if(H.call(j,0,x.call(j,a)))return b.call(j);for(var d=z.call(j,a,0),e=1;;)if(e<x.call(j,a))d=b.call(j,d,z.call(j,a,e)),e+=1;else return d}var e=j,e=function(e,h,i,k){switch(arguments.length){case 2:return d.call(this,e,h);case 3:return b.call(this,e,h,i);case 4:return a.call(this,
e,h,i,k)}c("Invalid arity: "+arguments.length)};e.f=d;e.g=b;e.J=a;return e}();function Ja(a,b){this.p=a;this.i=b}o=Ja.prototype;o.q=function(a){return J.call(j,a)};o.F=g;o.v=function(a,b){return K.call(j,b,a)};o.toString=function(){return L.call(j,this)};o.aa=function(a,b){return Ia.call(j,this.p,b,this.p[this.i],this.i+1)};o.ba=function(a,b,d){return Ia.call(j,this.p,b,d,this.i)};o.o=aa();o.B=function(){return this.p.length-this.i};o.I=g;o.C=function(){return this.p[this.i]};
o.D=function(){return this.i+1<this.p.length?new Ja(this.p,this.i+1):I.call(j)};o.j=function(a,b){return Ka.call(j,a,b)};o.Y=function(a,b){var d=b+this.i;return d<this.p.length?this.p[d]:j};o.Z=function(a,b,d){a=b+this.i;return a<this.p.length?this.p[a]:d};function La(a,b){return H.call(j,0,a.length)?j:new Ja(a,b)}function D(a,b){return La.call(j,a,b)}
B.array=function(){return function(a,b,d){switch(arguments.length){case 2:return Ia.call(j,a,b);case 3:return Ia.call(j,a,b,d)}c("Invalid arity: "+arguments.length)}}();A.array=function(){return function(a,b,d){switch(arguments.length){case 2:return a[b];case 3:return z.call(j,a,b,d)}c("Invalid arity: "+arguments.length)}}();z.array=function(){return function(a,b,d){switch(arguments.length){case 2:return b<a.length?a[b]:j;case 3:return b<a.length?a[b]:d}c("Invalid arity: "+arguments.length)}}();
x.array=function(a){return a.length};Ea.array=function(a){return D.call(j,a,0)};function M(a){return t(a)?Ea.call(j,a):j}function F(a){a=M.call(j,a);return t(a)?sa.call(j,a):j}function G(a){return ta.call(j,M.call(j,a))}function E(a){return t(a)?M.call(j,G.call(j,a)):j}function Ma(a){return F.call(j,E.call(j,a))}function Na(a){return E.call(j,E.call(j,a))}x._=function(a){for(var a=M.call(j,a),b=0;;)if(t(a))a=E.call(j,a),b+=1;else return b};Ca._=function(a,b){return a===b};
function N(a){return t(a)?l:g}
var Oa=function(){function a(a,b){return y.call(j,a,b)}var b=j,d=function(){function a(b,e,k){var q=j;r(k)&&(q=D(Array.prototype.slice.call(arguments,2),0));return d.call(this,b,e,q)}function d(a,e,f){for(;;)if(t(f))a=b.call(j,a,e),e=F.call(j,f),f=E.call(j,f);else return b.call(j,a,e)}a.e=2;a.a=function(a){var b=F(a),e=F(E(a)),a=G(E(a));return d.call(this,b,e,a)};return a}(),b=function(b,f,h){switch(arguments.length){case 2:return a.call(this,b,f);default:return d.apply(this,arguments)}c("Invalid arity: "+
arguments.length)};b.e=2;b.a=d.a;b.f=a;b.g=d;return b}();function Pa(a){return x.call(j,a)}
var Qa=function(){function a(a,b,d){return z.call(j,a,Math.floor(b),d)}function b(a,b){return z.call(j,a,Math.floor(b))}var d=j,d=function(d,f,h){switch(arguments.length){case 2:return b.call(this,d,f);case 3:return a.call(this,d,f,h)}c("Invalid arity: "+arguments.length)};d.f=b;d.g=a;return d}(),O=function(){function a(a,b,d){return A.call(j,a,b,d)}function b(a,b){return A.call(j,a,b)}var d=j,d=function(d,f,h){switch(arguments.length){case 2:return b.call(this,d,f);case 3:return a.call(this,d,f,
h)}c("Invalid arity: "+arguments.length)};d.f=b;d.g=a;return d}(),Ra=function(){function a(a,b,d){return ua.call(j,a,b,d)}var b=j,d=function(){function a(b,e,k,q){var v=j;r(q)&&(v=D(Array.prototype.slice.call(arguments,3),0));return d.call(this,b,e,k,v)}function d(a,e,f,q){for(;;)if(a=b.call(j,a,e,f),t(q))e=F.call(j,q),f=Ma.call(j,q),q=Na.call(j,q);else return a}a.e=3;a.a=function(a){var b=F(a),e=F(E(a)),q=F(E(E(a))),a=G(E(E(a)));return d.call(this,b,e,q,a)};return a}(),b=function(b,f,h,i){switch(arguments.length){case 3:return a.call(this,
b,f,h);default:return d.apply(this,arguments)}c("Invalid arity: "+arguments.length)};b.e=3;b.a=d.a;b.g=a;b.J=d;return b}(),Sa=function(){function a(a,b){return wa.call(j,a,b)}var b=j,d=function(){function a(b,e,k){var q=j;r(k)&&(q=D(Array.prototype.slice.call(arguments,2),0));return d.call(this,b,e,q)}function d(a,e,f){for(;;)if(a=b.call(j,a,e),t(f))e=F.call(j,f),f=E.call(j,f);else return a}a.e=2;a.a=function(a){var b=F(a),e=F(E(a)),a=G(E(a));return d.call(this,b,e,a)};return a}(),b=function(b,f,
h){switch(arguments.length){case 1:return b;case 2:return a.call(this,b,f);default:return d.apply(this,arguments)}c("Invalid arity: "+arguments.length)};b.e=2;b.a=d.a;b.w=aa();b.f=a;b.g=d;return b}();function Ta(a,b){return Ba.call(j,a,b)}function Ua(a){var b;t(a)?(b=a.m,b=t(b)?N.call(j,a.hasOwnProperty("cljs$core$IMeta$")):b):b=a;b=t(b)?g:oa.call(j,za,a);return t(b)?Aa.call(j,a):j}function P(a){return Da.call(j,a)}
function Va(a){var b;t(a)?(b=a.F,b=t(b)?N.call(j,a.hasOwnProperty("cljs$core$ISequential$")):b):b=a;return t(b)?g:oa.call(j,Fa,a)}function Wa(a){if(a===j)a=l;else{var b;t(a)?(b=a.$,b=t(b)?N.call(j,a.hasOwnProperty("cljs$core$IMap$")):b):b=a;a=t(b)?g:oa.call(j,va,a)}return a}function Xa(a){var b;t(a)?(b=a.fa,b=t(b)?N.call(j,a.hasOwnProperty("cljs$core$IVector$")):b):b=a;return t(b)?g:oa.call(j,ya,a)}function Ya(){return{}}
function Za(a){var b=[];ka.call(j,a,function(a,e){return b.push(e)});return b}function $a(a,b){return delete a[b]}function ab(a){if(a===j)a=l;else{var b;t(a)?(b=a.I,b=t(b)?N.call(j,a.hasOwnProperty("cljs$core$ISeq$")):b):b=a;a=t(b)?g:oa.call(j,ra,a)}return a}function bb(a){return t(a)?g:l}function cb(a){var b=ca.call(j,a);return t(b)?N.call(j,function(){var b=H.call(j,a.charAt(0),"\ufdd0");return b?b:H.call(j,a.charAt(0),"\ufdd1")}()):b}
function db(a){var b=ca.call(j,a);return t(b)?H.call(j,a.charAt(0),"\ufdd0"):b}function eb(a){var b=ca.call(j,a);return t(b)?H.call(j,a.charAt(0),"\ufdd1"):b}
var Q=function(){function a(a,b,d){return B.call(j,d,a,b)}function b(a,b){return B.call(j,b,a)}var d=j,d=function(d,f,h){switch(arguments.length){case 2:return b.call(this,d,f);case 3:return a.call(this,d,f,h)}c("Invalid arity: "+arguments.length)};d.f=b;d.g=a;return d}(),fb=function(){function a(a,b,d){for(d=M.call(j,d);;)if(t(d))b=a.call(j,b,F.call(j,d)),d=E.call(j,d);else return b}function b(a,b){var d=M.call(j,b);return t(d)?Q.call(j,a,F.call(j,d),E.call(j,d)):a.call(j)}var d=j,d=function(d,f,
h){switch(arguments.length){case 2:return b.call(this,d,f);case 3:return a.call(this,d,f,h)}c("Invalid arity: "+arguments.length)};d.f=b;d.g=a;return d}();B._=function(){return function(a,b,d){switch(arguments.length){case 2:return fb.call(j,b,a);case 3:return fb.call(j,b,d,a)}c("Invalid arity: "+arguments.length)}}();function gb(a){return 0<=a?Math.floor.call(j,a):Math.ceil.call(j,a)}function hb(a,b){return gb.call(j,(a-a%b)/b)}function ib(a){for(var b=0;;){if(0===a)return b;a&=a-1;b+=1}}
function jb(a,b){for(var d=b,e=M.call(j,a);;){var f=e;if(t(t(f)?0<d:f))d-=1,e=E.call(j,e);else return e}}z._=function(){return function(a,b,d){switch(arguments.length){case 2:var e;var f=jb.call(j,a,b);t(f)?e=F.call(j,f):c(Error("Index out of bounds"));return e;case 3:return e=jb.call(j,a,b),t(e)?F.call(j,e):d}c("Invalid arity: "+arguments.length)}}();
var kb=function(){function a(a){return a===j?"":a.toString()}var b=j,d=function(){function a(b,e){var k=j;r(e)&&(k=D(Array.prototype.slice.call(arguments,1),0));return d.call(this,b,k)}function d(a,e){return function(a,d){for(;;)if(t(d))var e=a.append(b.call(j,F.call(j,d))),f=E.call(j,d),a=e,d=f;else return b.call(j,a)}.call(j,new na(b.call(j,a)),e)}a.e=1;a.a=function(a){var b=F(a),a=G(a);return d.call(this,b,a)};return a}(),b=function(b,f){switch(arguments.length){case 0:return"";case 1:return a.call(this,
b);default:return d.apply(this,arguments)}c("Invalid arity: "+arguments.length)};b.e=1;b.a=d.a;b.ea=n("");b.w=a;b.f=d;return b}(),R=function(){function a(a){return eb.call(j,a)?a.substring(2,a.length):db.call(j,a)?kb.call(j,":",a.substring(2,a.length)):a===j?"":a.toString()}var b=j,d=function(){function a(b,e){var k=j;r(e)&&(k=D(Array.prototype.slice.call(arguments,1),0));return d.call(this,b,k)}function d(a,e){return function(a,d){for(;;)if(t(d))var e=a.append(b.call(j,F.call(j,d))),f=E.call(j,d),
a=e,d=f;else return kb.call(j,a)}.call(j,new na(b.call(j,a)),e)}a.e=1;a.a=function(a){var b=F(a),a=G(a);return d.call(this,b,a)};return a}(),b=function(b,f){switch(arguments.length){case 0:return"";case 1:return a.call(this,b);default:return d.apply(this,arguments)}c("Invalid arity: "+arguments.length)};b.e=1;b.a=d.a;b.ea=n("");b.w=a;b.f=d;return b}(),lb=function(){var a=j,a=function(a,d,e){switch(arguments.length){case 2:return a.substring(d);case 3:return a.substring(d,e)}c("Invalid arity: "+arguments.length)};
a.f=function(a,d){return a.substring(d)};a.g=function(a,d,e){return a.substring(d,e)};return a}();function Ka(a,b){return bb.call(j,Va.call(j,b)?function(){for(var d=M.call(j,a),e=M.call(j,b);;){if(d===j)return e===j;if(e!==j&&H.call(j,F.call(j,d),F.call(j,e)))d=E.call(j,d),e=E.call(j,e);else return l}}():j)}function mb(a,b){return a^b+2654435769+(a<<6)+(a>>2)}function J(a){return Q.call(j,function(a,d){return mb.call(j,a,P.call(j,d))},P.call(j,F.call(j,a)),E.call(j,a))}
function nb(a,b,d,e){this.d=a;this.T=b;this.O=d;this.t=e}o=nb.prototype;o.q=function(a){return J.call(j,a)};o.F=g;o.v=function(a,b){return new nb(this.d,b,a,this.t+1)};o.toString=function(){return L.call(j,this)};o.o=aa();o.B=m("t");o.I=g;o.C=m("T");o.D=m("O");o.j=function(a,b){return Ka.call(j,a,b)};o.s=function(a,b){return new nb(b,this.T,this.O,this.t)};o.m=g;o.r=m("d");function ob(a){this.d=a}o=ob.prototype;o.q=function(a){return J.call(j,a)};o.F=g;o.v=function(a,b){return new nb(this.d,b,j,1)};
o.toString=function(){return L.call(j,this)};o.o=n(j);o.B=n(0);o.I=g;o.C=n(j);o.D=n(j);o.j=function(a,b){return Ka.call(j,a,b)};o.s=function(a,b){return new ob(b)};o.m=g;o.r=m("d");var pb=new ob(j);function qb(a){return Q.call(j,Oa,pb,a)}var I=function(){function a(a){var d=j;r(a)&&(d=D(Array.prototype.slice.call(arguments,0),0));return Q.call(j,Oa,pb,qb.call(j,d))}a.e=0;a.a=function(a){a=M(a);return Q.call(j,Oa,pb,qb.call(j,a))};return a}();function rb(a,b,d){this.d=a;this.T=b;this.O=d}o=rb.prototype;
o.q=function(a){return J.call(j,a)};o.F=g;o.v=function(a,b){return new rb(j,b,a)};o.toString=function(){return L.call(j,this)};o.o=aa();o.I=g;o.C=m("T");o.D=function(){return this.O===j?pb:this.O};o.j=function(a,b){return Ka.call(j,a,b)};o.s=function(a,b){return new rb(b,this.T,this.O)};o.m=g;o.r=m("d");function K(a,b){return new rb(j,a,b)}B.string=function(){return function(a,b,d){switch(arguments.length){case 2:return Ia.call(j,a,b);case 3:return Ia.call(j,a,b,d)}c("Invalid arity: "+arguments.length)}}();
A.string=function(){return function(a,b,d){switch(arguments.length){case 2:return z.call(j,a,b);case 3:return z.call(j,a,b,d)}c("Invalid arity: "+arguments.length)}}();z.string=function(){return function(a,b,d){switch(arguments.length){case 2:return b<x.call(j,a)?a.charAt(b):j;case 3:return b<x.call(j,a)?a.charAt(b):d}c("Invalid arity: "+arguments.length)}}();x.string=function(a){return a.length};Ea.string=function(a){return La.call(j,a,0)};Da.string=function(a){return ja.call(j,a)};
String.prototype.call=function(){return function(a,b,d){switch(arguments.length){case 2:return O.call(j,b,this.toString());case 3:return O.call(j,b,this.toString(),d)}c("Invalid arity: "+arguments.length)}}();String.prototype.apply=function(a,b){return 2>Pa.call(j,b)?O.call(j,b[0],a):O.call(j,b[0],a,b[1])};function sb(a){var b=a.x;if(t(a.da))return b;a.x=b.call(j);a.da=g;return a.x}function S(a,b,d){this.d=a;this.da=b;this.x=d}o=S.prototype;o.q=function(a){return J.call(j,a)};o.F=g;
o.v=function(a,b){return K.call(j,b,a)};o.toString=function(){return L.call(j,this)};o.o=function(a){return M.call(j,sb.call(j,a))};o.I=g;o.C=function(a){return F.call(j,sb.call(j,a))};o.D=function(a){return G.call(j,sb.call(j,a))};o.j=function(a,b){return Ka.call(j,a,b)};o.s=function(a,b){return new S(b,this.da,this.x)};o.m=g;o.r=m("d");function T(a){for(var b=[];;)if(t(M.call(j,a)))b.push(F.call(j,a)),a=E.call(j,a);else return b}
function tb(a,b){for(var d=a,e=b,f=0;;){var h;h=(h=0<e)?M.call(j,d):h;if(t(h))d=E.call(j,d),e-=1,f+=1;else return f}}
var vb=function ub(b){return b===j?j:E.call(j,b)===j?M.call(j,F.call(j,b)):K.call(j,F.call(j,b),ub.call(j,E.call(j,b)))},wb=function(){function a(a,b){return new S(j,l,function(){var d=M.call(j,a);return t(d)?K.call(j,F.call(j,d),e.call(j,G.call(j,d),b)):b})}function b(a){return new S(j,l,function(){return a})}function d(){return new S(j,l,n(j))}var e=j,f=function(){function a(d,e,f){var h=j;r(f)&&(h=D(Array.prototype.slice.call(arguments,2),0));return b.call(this,d,e,h)}function b(a,d,f){return function Z(a,
b){return new S(j,l,function(){var d=M.call(j,a);return t(d)?K.call(j,F.call(j,d),Z.call(j,G.call(j,d),b)):t(b)?Z.call(j,F.call(j,b),E.call(j,b)):j})}.call(j,e.call(j,a,d),f)}a.e=2;a.a=function(a){var d=F(a),e=F(E(a)),a=G(E(a));return b.call(this,d,e,a)};return a}(),e=function(e,i,k){switch(arguments.length){case 0:return d.call(this);case 1:return b.call(this,e);case 2:return a.call(this,e,i);default:return f.apply(this,arguments)}c("Invalid arity: "+arguments.length)};e.e=2;e.a=f.a;e.ea=d;e.w=b;
e.f=a;e.g=f;return e}(),xb=function(){function a(a,b,d,e){return K.call(j,a,K.call(j,b,K.call(j,d,e)))}function b(a,b,d){return K.call(j,a,K.call(j,b,d))}function d(a,b){return K.call(j,a,b)}function e(a){return M.call(j,a)}var f=j,h=function(){function a(d,e,f,h,i){var xa=j;r(i)&&(xa=D(Array.prototype.slice.call(arguments,4),0));return b.call(this,d,e,f,h,xa)}function b(a,d,e,f,h){return K.call(j,a,K.call(j,d,K.call(j,e,K.call(j,f,vb.call(j,h)))))}a.e=4;a.a=function(a){var d=F(a),e=F(E(a)),f=F(E(E(a))),
h=F(E(E(E(a)))),a=G(E(E(E(a))));return b.call(this,d,e,f,h,a)};return a}(),f=function(f,k,q,v,qa){switch(arguments.length){case 1:return e.call(this,f);case 2:return d.call(this,f,k);case 3:return b.call(this,f,k,q);case 4:return a.call(this,f,k,q,v);default:return h.apply(this,arguments)}c("Invalid arity: "+arguments.length)};f.e=4;f.a=h.a;f.w=e;f.f=d;f.g=b;f.J=a;f.ca=h;return f}(),yb=function(){function a(a,b,d,e,f){b=xb.call(j,b,d,e,f);d=a.e;return t(a.a)?tb.call(j,b,d)<=d?a.apply(a,T.call(j,b)):
a.a(b):a.apply(a,T.call(j,b))}function b(a,b,d,e){b=xb.call(j,b,d,e);d=a.e;return t(a.a)?tb.call(j,b,d)<=d?a.apply(a,T.call(j,b)):a.a(b):a.apply(a,T.call(j,b))}function d(a,b,d){b=xb.call(j,b,d);d=a.e;return t(a.a)?tb.call(j,b,d)<=d?a.apply(a,T.call(j,b)):a.a(b):a.apply(a,T.call(j,b))}function e(a,b){var d=a.e;return t(a.a)?tb.call(j,b,d+1)<=d?a.apply(a,T.call(j,b)):a.a(b):a.apply(a,T.call(j,b))}var f=j,h=function(){function a(d,e,f,h,i,xa){var Jb=j;r(xa)&&(Jb=D(Array.prototype.slice.call(arguments,
5),0));return b.call(this,d,e,f,h,i,Jb)}function b(a,d,e,f,h,i){d=K.call(j,d,K.call(j,e,K.call(j,f,K.call(j,h,vb.call(j,i)))));e=a.e;return t(a.a)?tb.call(j,d,e)<=e?a.apply(a,T.call(j,d)):a.a(d):a.apply(a,T.call(j,d))}a.e=5;a.a=function(a){var d=F(a),e=F(E(a)),f=F(E(E(a))),h=F(E(E(E(a)))),i=F(E(E(E(E(a))))),a=G(E(E(E(E(a)))));return b.call(this,d,e,f,h,i,a)};return a}(),f=function(f,k,q,v,qa,Z){switch(arguments.length){case 2:return e.call(this,f,k);case 3:return d.call(this,f,k,q);case 4:return b.call(this,
f,k,q,v);case 5:return a.call(this,f,k,q,v,qa);default:return h.apply(this,arguments)}c("Invalid arity: "+arguments.length)};f.e=5;f.a=h.a;f.f=e;f.g=d;f.J=b;f.ca=a;f.ga=h;return f}();function zb(a,b){for(;;){if(M.call(j,b)===j)return g;if(t(a.call(j,F.call(j,b))))var d=a,e=E.call(j,b),a=d,b=e;else return l}}function Ab(a){return a}
var U=function(){function a(a,b,d,f){return new S(j,l,function(){var v=M.call(j,b),qa=M.call(j,d),Z=M.call(j,f);return t(t(v)?t(qa)?Z:qa:v)?K.call(j,a.call(j,F.call(j,v),F.call(j,qa),F.call(j,Z)),e.call(j,a,G.call(j,v),G.call(j,qa),G.call(j,Z))):j})}function b(a,b,d){return new S(j,l,function(){var f=M.call(j,b),v=M.call(j,d);return t(t(f)?v:f)?K.call(j,a.call(j,F.call(j,f),F.call(j,v)),e.call(j,a,G.call(j,f),G.call(j,v))):j})}function d(a,b){return new S(j,l,function(){var d=M.call(j,b);return t(d)?
K.call(j,a.call(j,F.call(j,d)),e.call(j,a,G.call(j,d))):j})}var e=j,f=function(){function a(d,e,f,h,Z){var Ib=j;r(Z)&&(Ib=D(Array.prototype.slice.call(arguments,4),0));return b.call(this,d,e,f,h,Ib)}function b(a,d,f,h,i){return e.call(j,function(b){return yb.call(j,a,b)},function xa(a){return new S(j,l,function(){var b=e.call(j,M,a);return zb.call(j,Ab,b)?K.call(j,e.call(j,F,b),xa.call(j,e.call(j,G,b))):j})}.call(j,Oa.call(j,i,h,f,d)))}a.e=4;a.a=function(a){var d=F(a),e=F(E(a)),f=F(E(E(a))),h=F(E(E(E(a)))),
a=G(E(E(E(a))));return b.call(this,d,e,f,h,a)};return a}(),e=function(e,i,k,q,v){switch(arguments.length){case 2:return d.call(this,e,i);case 3:return b.call(this,e,i,k);case 4:return a.call(this,e,i,k,q);default:return f.apply(this,arguments)}c("Invalid arity: "+arguments.length)};e.e=4;e.a=f.a;e.f=d;e.g=b;e.J=a;e.ca=f;return e}(),Cb=function Bb(b,d){return new S(j,l,function(){if(0<b){var e=M.call(j,d);return t(e)?K.call(j,F.call(j,e),Bb.call(j,b-1,G.call(j,e))):j}return j})};
function Db(a,b){function d(a,b){for(;;){var d=M.call(j,b),i=0<a;if(t(i?d:i))i=a-1,d=G.call(j,d),a=i,b=d;else return d}}return new S(j,l,function(){return d.call(j,a,b)})}
var Eb=function(){function a(a,b){return Cb.call(j,a,d.call(j,b))}function b(a){return new S(j,l,function(){return K.call(j,a,d.call(j,a))})}var d=j,d=function(d,f){switch(arguments.length){case 1:return b.call(this,d);case 2:return a.call(this,d,f)}c("Invalid arity: "+arguments.length)};d.w=b;d.f=a;return d}(),Fb=function(){function a(a,d){return new S(j,l,function(){var h=M.call(j,a),i=M.call(j,d);return t(t(h)?i:h)?K.call(j,F.call(j,h),K.call(j,F.call(j,i),b.call(j,G.call(j,h),G.call(j,i)))):j})}
var b=j,d=function(){function a(b,e,k){var q=j;r(k)&&(q=D(Array.prototype.slice.call(arguments,2),0));return d.call(this,b,e,q)}function d(a,e,f){return new S(j,l,function(){var d=U.call(j,M,Oa.call(j,f,e,a));return zb.call(j,Ab,d)?wb.call(j,U.call(j,F,d),yb.call(j,b,U.call(j,G,d))):j})}a.e=2;a.a=function(a){var b=F(a),e=F(E(a)),a=G(E(a));return d.call(this,b,e,a)};return a}(),b=function(b,f,h){switch(arguments.length){case 2:return a.call(this,b,f);default:return d.apply(this,arguments)}c("Invalid arity: "+
arguments.length)};b.e=2;b.a=d.a;b.f=a;b.g=d;return b}();function Gb(a,b){return Db.call(j,1,Fb.call(j,Eb.call(j,a),b))}function Hb(a){return function d(a,f){return new S(j,l,function(){var h=M.call(j,a);return t(h)?K.call(j,F.call(j,h),d.call(j,G.call(j,h),f)):t(M.call(j,f))?d.call(j,F.call(j,f),G.call(j,f)):j})}.call(j,j,a)}
var Kb=function(){function a(a,b){return Hb.call(j,U.call(j,a,b))}var b=j,d=function(){function a(b,d,e){var k=j;r(e)&&(k=D(Array.prototype.slice.call(arguments,2),0));return Hb.call(j,yb.call(j,U,b,d,k))}a.e=2;a.a=function(a){var b=F(a),d=F(E(a)),a=G(E(a));return Hb.call(j,yb.call(j,U,b,d,a))};return a}(),b=function(b,f,h){switch(arguments.length){case 2:return a.call(this,b,f);default:return d.apply(this,arguments)}c("Invalid arity: "+arguments.length)};b.e=2;b.a=d.a;b.f=a;b.g=d;return b}();
function Lb(a,b){return Q.call(j,y,a,b)}
var Mb=function(){function a(a,b,d,k){return new S(j,l,function(){var q=M.call(j,k);if(t(q)){var v=Cb.call(j,a,q);return H.call(j,a,Pa.call(j,v))?K.call(j,v,e.call(j,a,b,d,Db.call(j,b,q))):I.call(j,Cb.call(j,a,wb.call(j,v,d)))}return j})}function b(a,b,d){return new S(j,l,function(){var k=M.call(j,d);if(t(k)){var q=Cb.call(j,a,k);return H.call(j,a,Pa.call(j,q))?K.call(j,q,e.call(j,a,b,Db.call(j,b,k))):j}return j})}function d(a,b){return e.call(j,a,a,b)}var e=j,e=function(e,h,i,k){switch(arguments.length){case 2:return d.call(this,
e,h);case 3:return b.call(this,e,h,i);case 4:return a.call(this,e,h,i,k)}c("Invalid arity: "+arguments.length)};e.f=d;e.g=b;e.J=a;return e}();function Nb(a){a=a.c;return 32>a?0:a-1>>5<<5}function Ob(a,b){for(var d=a,e=b;;){if(0===d)return e;var f=w.call(j,Pb);f[0]=e;e=f;d-=5}}var Rb=function Qb(b,d,e,f){var h=w.call(j,e),i=b.c-1>>d&31;5===d?h[i]=f:(e=e[i],b=t(e)?Qb.call(j,b,d-5,e,f):Ob.call(j,d-5,f),h[i]=b);return h};
function Sb(a,b){var d=0<=b;if(d?b<a.c:d){if(b>=Nb.call(j,a))return a.M;for(var d=a.root,e=a.shift;;)if(0<e)var f=e-5,d=d[b>>e&31],e=f;else return d}else c(Error(R.call(j,"No item ",b," in vector of length ",a.c)))}var Ub=function Tb(b,d,e,f,h){var i=w.call(j,e);if(0===d)i[f&31]=h;else{var k=f>>d&31;i[k]=Tb.call(j,b,d-5,e[k],f,h)}return i};function V(a,b,d,e,f){this.d=a;this.c=b;this.shift=d;this.root=e;this.M=f}o=V.prototype;o.q=function(a){return J.call(j,a)};
o.R=function(a,b){return z.call(j,a,b,j)};o.S=function(a,b,d){return z.call(j,a,b,d)};o.Q=function(a,b,d){var e=0<=b;if(e?b<this.c:e)return Nb.call(j,a)<=b?(a=w.call(j,this.M),a[b&31]=d,new V(this.d,this.c,this.shift,this.root,a)):new V(this.d,this.c,this.shift,Ub.call(j,a,this.shift,this.root,b,d),this.M);if(b===this.c)return y.call(j,a,d);c(Error(R.call(j,"Index ",b," out of bounds  [0,",this.c,"]")))};
o.call=function(){return function(a,b,d){switch(arguments.length){case 2:return A.call(j,this,b);case 3:return A.call(j,this,b,d)}c("Invalid arity: "+arguments.length)}}();o.F=g;
o.v=function(a,b){if(32>this.c-Nb.call(j,a)){var d=w.call(j,this.M);d.push(b);return new V(this.d,this.c+1,this.shift,this.root,d)}var e=this.c>>5>1<<this.shift,d=e?this.shift+5:this.shift;e?(e=w.call(j,Pb),e[0]=this.root,e[1]=Ob.call(j,this.shift,this.M)):e=Rb.call(j,a,this.shift,this.root,this.M);return new V(this.d,this.c+1,d,e,[b])};o.toString=function(){return L.call(j,this)};o.aa=function(a,b){return Ia.call(j,a,b)};o.ba=function(a,b,d){return Ia.call(j,a,b,d)};
o.o=function(a){var b=this;return 0<b.c?function e(f){return new S(j,l,function(){return f<b.c?K.call(j,z.call(j,a,f),e.call(j,f+1)):j})}.call(j,0):j};o.B=m("c");o.fa=g;o.j=function(a,b){return Ka.call(j,a,b)};o.s=function(a,b){return new V(b,this.c,this.shift,this.root,this.M)};o.m=g;o.r=m("d");o.Y=function(a,b){return Sb.call(j,a,b)[b&31]};o.Z=function(a,b,d){var e=0<=b;return(e?b<this.c:e)?z.call(j,a,b):d};var Pb=pa.call(j,32),Vb=new V(j,0,5,Pb,[]);function W(a){return Lb.call(j,Vb,a)}
function Wb(a){return Q.call(j,Oa,Vb,a)}var Xb=function(){function a(a){var d=j;r(a)&&(d=D(Array.prototype.slice.call(arguments,0),0));return Wb.call(j,d)}a.e=0;a.a=function(a){a=M(a);return Wb.call(j,a)};return a}();W([]);function Yb(){}Yb.prototype.j=n(l);var Zb=new Yb;function $b(a,b){return bb.call(j,Wa.call(j,b)?H.call(j,Pa.call(j,a),Pa.call(j,b))?zb.call(j,Ab,U.call(j,function(a){return H.call(j,O.call(j,b,F.call(j,a),Zb),Ma.call(j,a))},a)):j:j)}
function ac(a,b,d){for(var e=d.length,f=0;;)if(f<e){if(H.call(j,b,d[f]))return f;f+=a}else return j}var bc=function(){function a(a,b,d,i){var k=ca.call(j,a);return t(t(k)?b.hasOwnProperty(a):k)?d:i}function b(a,b){return d.call(j,a,b,g,l)}var d=j,d=function(d,f,h,i){switch(arguments.length){case 2:return b.call(this,d,f);case 4:return a.call(this,d,f,h,i)}c("Invalid arity: "+arguments.length)};d.f=b;d.J=a;return d}();function cc(a,b){var d=P.call(j,a),e=P.call(j,b);return d<e?-1:d>e?1:0}
function dc(a,b,d){this.d=a;this.keys=b;this.L=d}o=dc.prototype;o.q=function(a){return J.call(j,a)};o.R=function(a,b){return A.call(j,a,b,j)};o.S=function(a,b,d){return bc.call(j,b,this.L,this.L[b],d)};o.Q=function(a,b,d){if(t(ca.call(j,b))){var a=la.call(j,this.L),e=a.hasOwnProperty(b);a[b]=d;if(t(e))return new dc(this.d,this.keys,a);d=w.call(j,this.keys);d.push(b);return new dc(this.d,d,a)}return Ta.call(j,Lb.call(j,Ha.call(j,b,d),M.call(j,a)),this.d)};
o.call=function(){return function(a,b,d){switch(arguments.length){case 2:return A.call(j,this,b);case 3:return A.call(j,this,b,d)}c("Invalid arity: "+arguments.length)}}();o.v=function(a,b){return Xa.call(j,b)?ua.call(j,a,z.call(j,b,0),z.call(j,b,1)):Q.call(j,y,a,b)};o.toString=function(){return L.call(j,this)};o.o=function(){var a=this;return 0<a.keys.length?U.call(j,function(b){return Xb.call(j,b,a.L[b])},a.keys.sort(cc)):j};o.B=function(){return this.keys.length};
o.j=function(a,b){return $b.call(j,a,b)};o.s=function(a,b){return new dc(b,this.keys,this.L)};o.m=g;o.r=m("d");o.$=g;o.W=function(a,b){var d=ca.call(j,b);if(t(t(d)?this.L.hasOwnProperty(b):d)){var d=w.call(j,this.keys),e=la.call(j,this.L);d.splice(ac.call(j,1,b,d),1);$a.call(j,e,b);return new dc(this.d,d,e)}return a};var ec=new dc(j,[],Ya.call(j));function fc(a,b,d){this.d=a;this.t=b;this.z=d}o=fc.prototype;o.q=function(a){return J.call(j,a)};o.R=function(a,b){return A.call(j,a,b,j)};
o.S=function(a,b,d){a=this.z[P.call(j,b)];b=t(a)?ac.call(j,2,b,a):j;return t(b)?a[b+1]:d};o.Q=function(a,b,d){var a=P.call(j,b),e=this.z[a];if(t(e)){var e=w.call(j,e),f=la.call(j,this.z);f[a]=e;a=ac.call(j,2,b,e);if(t(a))return e[a+1]=d,new fc(this.d,this.t,f);e.push(b,d);return new fc(this.d,this.t+1,f)}e=la.call(j,this.z);e[a]=[b,d];return new fc(this.d,this.t+1,e)};
o.call=function(){return function(a,b,d){switch(arguments.length){case 2:return A.call(j,this,b);case 3:return A.call(j,this,b,d)}c("Invalid arity: "+arguments.length)}}();o.v=function(a,b){return Xa.call(j,b)?ua.call(j,a,z.call(j,b,0),z.call(j,b,1)):Q.call(j,y,a,b)};o.toString=function(){return L.call(j,this)};o.o=function(){var a=this;if(0<a.t){var b=Za.call(j,a.z).sort();return Kb.call(j,function(b){return U.call(j,Wb,Mb.call(j,2,a.z[b]))},b)}return j};o.B=m("t");
o.j=function(a,b){return $b.call(j,a,b)};o.s=function(a,b){return new fc(b,this.t,this.z)};o.m=g;o.r=m("d");o.$=g;o.W=function(a,b){var d=P.call(j,b),e=this.z[d],f=t(e)?ac.call(j,2,b,e):j;if(N.call(j,f))return a;var h=la.call(j,this.z);3>e.length?$a.call(j,h,d):(e=w.call(j,e),e.splice(f,2),h[d]=e);return new fc(this.d,this.t-1,h)};
var gc=new fc(j,0,Ya.call(j)),hc=function(){function a(a,b,d,i,k){a=w.call(j,a);a[b]=d;a[i]=k;return a}function b(a,b,d){a=w.call(j,a);a[b]=d;return a}var d=j,d=function(d,f,h,i,k){switch(arguments.length){case 3:return b.call(this,d,f,h);case 5:return a.call(this,d,f,h,i,k)}c("Invalid arity: "+arguments.length)};d.g=b;d.ca=a;return d}();function ic(a,b,d,e,f){for(;;)if(0!==f)d[e]=a[b],e+=1,f-=1,b+=1;else break;return d}
function jc(a,b){var d=pa.call(j,a.length-2);ic.call(j,a,0,d,0,2*b);ic.call(j,a,2*(b+1),d,2*b,d.length-2*b);return d}function kc(a,b){return ib.call(j,a&b-1)}function X(a,b){this.h=a;this.b=b}
X.prototype.u=function(a,b,d,e,f){var h=1<<(b>>>a&31),i=kc.call(j,this.h,h);if(0===(this.h&h)){var k=ib.call(j,this.h);if(16<=k){i=pa.call(j,32);i[b>>>a&31]=lc.u(a+5,b,d,e,f);for(e=d=0;;)if(32>d)0!==(this.h>>>d&1)&&(i[d]=j!=this.b[e]?lc.u(a+5,P.call(j,this.b[e]),this.b[e],this.b[e+1],f):this.b[e+1],e+=2),d+=1;else break;return new mc(k+1,i)}a=pa.call(j,2*(k+1));ic.call(j,this.b,0,a,0,2*i);a[2*i]=d;f[0]=g;a[2*i+1]=e;ic.call(j,this.b,2*i,a,2*(i+1),2*(k-i));return new X(this.h|h,a)}h=this.b[2*i];k=this.b[2*
i+1];if(j==h)return f=k.u(a+5,b,d,e,f),f===k?this:new X(this.h,hc.call(j,this.b,2*i+1,f));if(H.call(j,d,h))return e===k?this:new X(this.h,hc.call(j,this.b,2*i+1,e));f[0]=g;return new X(this.h,hc.call(j,this.b,2*i,j,2*i+1,nc.call(j,a+5,h,k,b,d,e)))};
X.prototype.V=function(a,b,d){var e=1<<(b>>>a&31);if(0===(this.h&e))return this;var f=kc.call(j,this.h,e),h=this.b[2*f],i=this.b[2*f+1];return j==h?(a=i.V(a+5,b,d),a===i?this:j!=a?new X(this.h,hc.call(j,this.b,2*f+1,a)):this.h===e?j:new X(this.h^e,jc.call(j,this.b,f))):H.call(j,d,h)?new X(this.h^e,jc.call(j,this.b,f)):this};
X.prototype.K=function(){return function(a,b,d,e){switch(arguments.length){case 3:var f;f=1<<(b>>>a&31);if(0===(this.h&f))f=j;else{var h=kc.call(j,this.h,f);f=this.b[2*h];h=this.b[2*h+1];f=j==f?h.K(a+5,b,d):H.call(j,d,f)?W([f,h]):j}return f;case 4:return f=1<<(b>>>a&31),0===(this.h&f)?f=e:(h=kc.call(j,this.h,f),f=this.b[2*h],h=this.b[2*h+1],f=j==f?h.K(a+5,b,d,e):H.call(j,d,f)?W([f,h]):e),f}c("Invalid arity: "+arguments.length)}}();X.prototype.U=function(){return oc.call(j,this.b)};
var lc=new X(0,pa.call(j,0));function pc(a,b){for(var d=a.b,e=2*(a.c-1),f=pa.call(j,e),h=0,i=1,k=0;;)if(h<e){var q=h!=b;if(q?j!=d[h]:q)f[i]=d[h],i+=2,k|=1<<h;h+=1}else return new X(k,f)}function mc(a,b){this.c=a;this.b=b}mc.prototype.u=function(a,b,d,e,f){var h=b>>>a&31,i=this.b[h];if(j==i)return new mc(this.c+1,hc.call(j,this.b,h,lc.u(a+5,b,d,e,f)));a=i.u(a+5,b,d,e,f);return a===i?this:new mc(this.c,hc.call(j,this.b,h,a))};
mc.prototype.V=function(a,b,d){var e=b>>>a&31,f=this.b[e];return j!=f?(a=f.V(a+5,b,d),a===f?this:a===j?8>=this.c?pc.call(j,this,e):new mc(this.c-1,hc.call(j,this.b,e,a)):new mc(this.c,hc.call(j,this.b,e,a))):this};mc.prototype.K=function(){return function(a,b,d,e){switch(arguments.length){case 3:var f=this.b[b>>>a&31];return j!=f?f.K(a+5,b,d):j;case 4:return f=this.b[b>>>a&31],j!=f?f.K(a+5,b,d,e):e}c("Invalid arity: "+arguments.length)}}();mc.prototype.U=function(){return qc.call(j,this.b)};
function rc(a,b,d){for(var b=2*b,e=0;;)if(e<b){if(H.call(j,d,a[e]))return e;e+=2}else return-1}function sc(a,b,d){this.P=a;this.c=b;this.b=d}sc.prototype.u=function(a,b,d,e,f){if(b===this.P){a=rc.call(j,this.b,this.c,d);return-1===a?(a=this.b.length,b=pa.call(j,a+2),ic.call(j,this.b,0,b,0,a),b[a]=d,b[a+1]=e,f[0]=g,new sc(this.P,this.c+1,b)):H.call(j,this.b[a],e)?this:new sc(this.P,this.c,hc.call(j,this.b,a+1,e))}return(new X(1<<(this.P>>>a&31),[j,this])).u(a,b,d,e,f)};
sc.prototype.V=function(a,b,d){a=rc.call(j,this.b,this.c,d);return-1===a?this:1===this.c?j:new sc(this.P,this.c-1,jc.call(j,this.b,hb.call(j,a,2)))};sc.prototype.K=function(){return function(a,b,d,e){switch(arguments.length){case 3:var f=rc.call(j,this.b,this.c,d);return 0>f?j:H.call(j,d,this.b[f])?W([this.b[f],this.b[f+1]]):j;case 4:return f=rc.call(j,this.b,this.c,d),0>f?j:H.call(j,d,this.b[f])?W([this.b[f],this.b[f+1]]):e}c("Invalid arity: "+arguments.length)}}();
sc.prototype.U=function(){return oc.call(j,this.b)};function nc(a,b,d,e,f,h){var i=P.call(j,b);if(i===e)return new sc(i,2,[b,d,f,h]);var k=[l];return lc.u(a,i,b,d,k).u(a,e,f,h,k)}function tc(a,b,d,e){this.d=a;this.H=b;this.i=d;this.A=e}o=tc.prototype;o.j=function(a,b){return Ka.call(j,a,b)};o.o=aa();o.I=g;o.C=function(){return this.A===j?W([this.H[this.i],this.H[this.i+1]]):F.call(j,this.A)};o.D=function(){return this.A===j?oc.call(j,this.H,this.i+2,j):oc.call(j,this.H,this.i,E.call(j,this.A))};
o.F=g;o.s=function(a,b){return new tc(b,this.H,this.i,this.A)};o.m=g;o.r=m("d");var oc=function(){function a(a,b,d){if(d===j)for(d=a.length;;)if(b<d){if(j!=a[b])return new tc(j,a,b,j);var i=a[b+1];if(t(i)&&(i=i.U(),t(i)))return new tc(j,a,b+2,i);b+=2}else return j;else return new tc(j,a,b,d)}function b(a){return d.call(j,a,0,j)}var d=j,d=function(d,f,h){switch(arguments.length){case 1:return b.call(this,d);case 3:return a.call(this,d,f,h)}c("Invalid arity: "+arguments.length)};d.w=b;d.g=a;return d}();
function uc(a,b,d,e){this.d=a;this.H=b;this.i=d;this.A=e}o=uc.prototype;o.j=function(a,b){return Ka.call(j,a,b)};o.o=aa();o.I=g;o.C=function(){return F.call(j,this.A)};o.D=function(){return qc.call(j,j,this.H,this.i,E.call(j,this.A))};o.F=g;o.s=function(a,b){return new uc(b,this.H,this.i,this.A)};o.m=g;o.r=m("d");
var qc=function(){function a(a,b,d,i){if(i===j)for(i=b.length;;)if(d<i){var k=b[d];if(t(k)&&(k=k.U(),t(k)))return new uc(a,b,d+1,k);d+=1}else return j;else return new uc(a,b,d,i)}function b(a){return d.call(j,j,a,0,j)}var d=j,d=function(d,f,h,i){switch(arguments.length){case 1:return b.call(this,d);case 4:return a.call(this,d,f,h,i)}c("Invalid arity: "+arguments.length)};d.w=b;d.J=a;return d}();function vc(a,b,d,e,f){this.d=a;this.c=b;this.root=d;this.G=e;this.N=f}o=vc.prototype;
o.q=function(a){return J.call(j,a)};o.R=function(a,b){return A.call(j,a,b,j)};o.S=function(a,b,d){return b===j?t(this.G)?this.N:d:this.root===j?d:Qa.call(j,this.root.K(0,P.call(j,b),b,[j,d]),1)};o.Q=function(a,b,d){if(b===j){var e=this.G;return t(t(e)?d===this.N:e)?a:new vc(this.d,t(this.G)?this.c:this.c+1,this.root,g,d)}e=[l];d=(this.root===j?lc:this.root).u(0,P.call(j,b),b,d,e);return d===this.root?a:new vc(this.d,t(e[0])?this.c+1:this.c,d,this.G,this.N)};
o.call=function(){return function(a,b,d){switch(arguments.length){case 2:return A.call(j,this,b);case 3:return A.call(j,this,b,d)}c("Invalid arity: "+arguments.length)}}();o.v=function(a,b){return Xa.call(j,b)?ua.call(j,a,z.call(j,b,0),z.call(j,b,1)):Q.call(j,y,a,b)};o.toString=function(){return L.call(j,this)};o.o=function(){if(0<this.c){var a=j!=this.root?this.root.U():j;return t(this.G)?K.call(j,W([j,this.N]),a):a}return j};o.B=m("c");o.j=function(a,b){return $b.call(j,a,b)};
o.s=function(a,b){return new vc(b,this.c,this.root,this.G,this.N)};o.m=g;o.r=m("d");o.$=g;o.W=function(a,b){if(b===j)return t(this.G)?new vc(this.d,this.c-1,this.root,l,j):a;if(this.root===j)return a;var d=this.root.V(0,P.call(j,b),b);return d===this.root?a:new vc(this.d,this.c-1,d,this.G,this.N)};var wc=new vc(j,0,j,l,j);function xc(a,b){for(var d=a.length,e=0,f=wc;;)if(e<d)var h=e+1,f=Ra.call(j,f,a[e],b[e]),e=h;else return f}
var Ha=function(){function a(a){var e=j;r(a)&&(e=D(Array.prototype.slice.call(arguments,0),0));return b.call(this,e)}function b(a){for(var a=M.call(j,a),b=wc;;)if(t(a))var f=Na.call(j,a),b=Ra.call(j,b,F.call(j,a),Ma.call(j,a)),a=f;else return b}a.e=0;a.a=function(a){a=M(a);return b.call(this,a)};return a}();Ha.call(j);
function yc(a){if(cb.call(j,a))return a;var b=db.call(j,a);if(b?b:eb.call(j,a))return b=a.lastIndexOf("/"),0>b?lb.call(j,a,2):lb.call(j,a,b+1);c(Error(R.call(j,"Doesn't support name: ",a)))}function zc(a){var b=db.call(j,a);if(b?b:eb.call(j,a))return b=a.lastIndexOf("/"),-1<b?lb.call(j,a,2,b):j;c(Error(R.call(j,"Doesn't support namespace: ",a)))}function Y(a,b,d,e,f,h){return wb.call(j,W([b]),Hb.call(j,Gb.call(j,W([d]),U.call(j,function(b){return a.call(j,b,f)},h))),W([e]))}
var $=function Ac(b,d){return b===j?I.call(j,"nil"):void 0===b?I.call(j,"#<undefined>"):wb.call(j,t(function(){var e=O.call(j,d,"\ufdd0'meta");return t(e)?(t(b)?(e=b.m,e=t(e)?N.call(j,b.hasOwnProperty("cljs$core$IMeta$")):e):e=b,e=t(e)?g:oa.call(j,za,b),t(e)?Ua.call(j,b):e):e}())?wb.call(j,W(["^"]),Ac.call(j,Ua.call(j,b),d),W([" "])):j,t(function(){var d;t(b)?(d=b.n,d=t(d)?N.call(j,b.hasOwnProperty("cljs$core$IPrintable$")):d):d=b;return t(d)?g:oa.call(j,Ga,b)}())?C.call(j,b,d):I.call(j,"#<",R.call(j,
b),">"))};function Bc(a,b){var d=F.call(j,a),e=new na,f=M.call(j,a);if(t(f))for(var h=F.call(j,f);;){h!==d&&e.append(" ");var i=M.call(j,$.call(j,h,b));if(t(i))for(h=F.call(j,i);;)if(e.append(h),h=E.call(j,i),t(h))i=h,h=F.call(j,i);else break;f=E.call(j,f);if(t(f))h=f,f=F.call(j,h),i=h,h=f,f=i;else break}return e}function Cc(a,b){return R.call(j,Bc.call(j,a,b))}function Dc(){return xc(["\ufdd0'flush-on-newline","\ufdd0'readably","\ufdd0'meta","\ufdd0'dup"],[g,g,l,l])}
var L=function(){function a(a){var d=j;r(a)&&(d=D(Array.prototype.slice.call(arguments,0),0));return Cc.call(j,d,Dc.call(j))}a.e=0;a.a=function(a){a=M(a);return Cc.call(j,a,Dc.call(j))};return a}();fc.prototype.n=g;fc.prototype.k=function(a,b){return Y.call(j,function(a){return Y.call(j,$,""," ","",b,a)},"{",", ","}",b,a)};Ga.number=g;C.number=function(a){return I.call(j,R.call(j,a))};Ja.prototype.n=g;Ja.prototype.k=function(a,b){return Y.call(j,$,"("," ",")",b,a)};S.prototype.n=g;
S.prototype.k=function(a,b){return Y.call(j,$,"("," ",")",b,a)};Ga["boolean"]=g;C["boolean"]=function(a){return I.call(j,R.call(j,a))};Ga.string=g;C.string=function(a,b){return db.call(j,a)?I.call(j,R.call(j,":",function(){var b=zc.call(j,a);return t(b)?R.call(j,b,"/"):j}(),yc.call(j,a))):eb.call(j,a)?I.call(j,R.call(j,function(){var b=zc.call(j,a);return t(b)?R.call(j,b,"/"):j}(),yc.call(j,a))):I.call(j,t("\ufdd0'readably".call(j,b))?ia.call(j,a):a)};tc.prototype.n=g;
tc.prototype.k=function(a,b){return Y.call(j,$,"("," ",")",b,a)};vc.prototype.n=g;vc.prototype.k=function(a,b){return Y.call(j,function(a){return Y.call(j,$,""," ","",b,a)},"{",", ","}",b,a)};V.prototype.n=g;V.prototype.k=function(a,b){return Y.call(j,$,"["," ","]",b,a)};nb.prototype.n=g;nb.prototype.k=function(a,b){return Y.call(j,$,"("," ",")",b,a)};Ga.array=g;C.array=function(a,b){return Y.call(j,$,"#<Array [",", ","]>",b,a)};Ga["function"]=g;
C["function"]=function(a){return I.call(j,"#<",R.call(j,a),">")};ob.prototype.n=g;ob.prototype.k=function(){return I.call(j,"()")};rb.prototype.n=g;rb.prototype.k=function(a,b){return Y.call(j,$,"("," ",")",b,a)};uc.prototype.n=g;uc.prototype.k=function(a,b){return Y.call(j,$,"("," ",")",b,a)};dc.prototype.n=g;dc.prototype.k=function(a,b){return Y.call(j,function(a){return Y.call(j,$,""," ","",b,a)},"{",", ","}",b,a)};function Ec(a,b,d,e){this.state=a;this.d=b;this.ha=d;this.ia=e}o=Ec.prototype;
o.q=function(a){return da.call(j,a)};o.n=g;o.k=function(a,b){return wb.call(j,W(["#<Atom: "]),C.call(j,this.state,b),">")};o.m=g;o.r=m("d");o.j=function(a,b){return a===b};
(function(){function a(a){return new Ec(a,j,j,j)}var b=j,d=function(){function a(d,e){var k=j;r(e)&&(k=D(Array.prototype.slice.call(arguments,1),0));return b.call(this,d,k)}function b(a,d){var e=ab.call(j,d)?yb.call(j,Ha,d):d,f=O.call(j,e,"\ufdd0'validator"),e=O.call(j,e,"\ufdd0'meta");return new Ec(a,e,f,j)}a.e=1;a.a=function(a){var d=F(a),a=G(a);return b.call(this,d,a)};return a}(),b=function(b,f){switch(arguments.length){case 1:return a.call(this,b);default:return d.apply(this,arguments)}c("Invalid arity: "+
arguments.length)};b.e=1;b.a=d.a;b.w=a;b.f=d;return b})().call(j,function(){return xc(["\ufdd0'parents","\ufdd0'descendants","\ufdd0'ancestors"],[xc([],[]),xc([],[]),xc([],[])])}.call(j));s("phm.empty_obj_map",function(){return ec});s("phm.empty_hash_map",function(){return gc});s("phm.empty_persistent_hash_map",function(){return wc});s("phm.assocwrapper",function(a,b,d){return Ra.g(a,b,d)});s("phm.dissocwrapper",function(a,b){return Sa.f(a,b)});s("phm.getwrapper",function(a,b){return O.f(a,b)});s("phm.getwrapperdefault",function(a,b,d){return O.g(a,b,d)});s("phm.invokewrapper",function(a,b){return a.call(j,b)});s("phm.invokewrapperdefault",function(a,b,d){return a.call(j,b,d)});
</script>
<script>
Benchmark.prototype.setup = function() {
    m = null;
    k1 = "foo1";
    k2 = "foo2";
    k3 = "foo3";
    k4 = "foo4";
    k5 = "foo5";
    k6 = "foo6";
};
</script>

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
ObjMap
var m = phm.empty_obj_map();
m = phm.assocwrapper(m, k1, 1);
m = phm.assocwrapper(m, k2, 2);
m = phm.assocwrapper(m, k3, 3);
m = phm.assocwrapper(m, k4, 4);
m = phm.assocwrapper(m, k5, 5);
m = phm.assocwrapper(m, k6, 6);
pending…
HashMap
var m = phm.empty_hash_map();
m = phm.assocwrapper(m, k1, 1);
m = phm.assocwrapper(m, k2, 2);
m = phm.assocwrapper(m, k3, 3);
m = phm.assocwrapper(m, k4, 4);
m = phm.assocwrapper(m, k5, 5);
m = phm.assocwrapper(m, k6, 6);
pending…
PersistentHashMap
var m = phm.empty_persistent_hash_map();
m = phm.assocwrapper(m, k1, 1);
m = phm.assocwrapper(m, k2, 2);
m = phm.assocwrapper(m, k3, 3);
m = phm.assocwrapper(m, k4, 4);
m = phm.assocwrapper(m, k5, 5);
m = phm.assocwrapper(m, k6, 6);
pending…

You can edit these tests or add even more tests to this page by appending /edit to the URL.

Compare results of other browsers

0 comments

Add a comment