Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why is the reference shallow-clone implementation so slow for low numbers of members to the trie? #19

Open
hughfdjackson opened this issue Apr 6, 2013 · 0 comments

Comments

@hughfdjackson
Copy link
Owner

At the moment, the benchmarks show it far too close to persistent-hash-trie implementations. I'd expect that shallow-clone would be WAYYYY slower.

assoc property with Trie of 1
//-------------------------//
shallow-copy reference  : 527,827.86 ± 3.77% ops/sec
v0.2.1                  : 733,140.34 ± 2.19% ops/sec
v0.3.1                  : 670,054.54 ± 2.18% ops/sec

assoc property with Trie of 10
//-------------------------//
shallow-copy reference  : 224,075.88 ± 1.51% ops/sec
v0.2.1                  : 379,912.96 ± 0.89% ops/sec
v0.3.1                  : 380,870.83 ± 1.90% ops/sec

assoc property with Trie of 100
//-------------------------//
shallow-copy reference  : 27,687.26 ± 1.47% ops/sec
v0.2.1                  : 103,969.98 ± 1.22% ops/sec
v0.3.1                  : 83,410.32 ± 2.33% ops/sec

assoc property with Trie of 1000
//-------------------------//
shallow-copy reference  : 2,765.97 ± 1.56% ops/sec
v0.2.1                  : 88,409.12 ± 1.15% ops/sec
v0.3.1                  : 58,476.34 ± 1.81% ops/sec

dissoc property with Trie of 1
//-------------------------//
shallow-copy reference  : 472,304.03 ± 2.00% ops/sec
v0.2.1                  : 500,163.65 ± 0.94% ops/sec
v0.3.1                  : 339,006.74 ± 1.33% ops/sec

dissoc property with Trie of 10
//-------------------------//
shallow-copy reference  : 234,291.83 ± 1.43% ops/sec
v0.2.1                  : 265,353.35 ± 0.97% ops/sec
v0.3.1                  : 231,454.93 ± 1.27% ops/sec

dissoc property with Trie of 100
//-------------------------//
shallow-copy reference  : 23,129.27 ± 1.14% ops/sec
v0.2.1                  : 104,765.06 ± 1.33% ops/sec
v0.3.1                  : 49,748.42 ± 0.90% ops/sec

dissoc property with Trie of 1000
//-------------------------//
shallow-copy reference  : 2,735.73 ± 1.25% ops/sec
v0.2.1                  : 66,539.11 ± 1.09% ops/sec
v0.3.1                  : 44,108.64 ± 1.41% ops/sec

has property with Trie of 1
//-------------------------//
shallow-copy reference  : 11,268,512.81 ± 0.95% ops/sec
v0.2.1                  : 9,996,323.62 ± 0.97% ops/sec
v0.3.1                  : 10,764,605.92 ± 1.10% ops/sec

has property with Trie of 10
//-------------------------//
shallow-copy reference  : 11,239,037.40 ± 0.96% ops/sec
v0.2.1                  : 8,848,967.81 ± 6.54% ops/sec
v0.3.1                  : 10,215,029.98 ± 1.16% ops/sec

has property with Trie of 100
//-------------------------//
shallow-copy reference  : 11,335,537.13 ± 1.10% ops/sec
v0.2.1                  : 4,965,439.67 ± 1.66% ops/sec
v0.3.1                  : 2,695,468.74 ± 0.82% ops/sec

has property with Trie of 1000
//-------------------------//
shallow-copy reference  : 9,988,683.47 ± 1.16% ops/sec
v0.2.1                  : 2,810,263.49 ± 1.61% ops/sec
v0.3.1                  : 2,860,534.34 ± 1.91% ops/sec

get property with Trie of 1
//-------------------------//
shallow-copy reference  : 33,840,663.32 ± 1.54% ops/sec
v0.2.1                  : 10,342,409.05 ± 0.94% ops/sec
v0.3.1                  : 11,718,582.12 ± 0.86% ops/sec

get property with Trie of 10
//-------------------------//
shallow-copy reference  : 35,464,325.40 ± 0.81% ops/sec
v0.2.1                  : 10,322,649.92 ± 0.98% ops/sec
v0.3.1                  : 11,385,616.80 ± 1.16% ops/sec

get property with Trie of 100
//-------------------------//
shallow-copy reference  : 35,888,018.23 ± 0.98% ops/sec
v0.2.1                  : 6,985,390.45 ± 1.13% ops/sec
v0.3.1                  : 4,127,919.22 ± 0.94% ops/sec

get property with Trie of 1000
//-------------------------//
shallow-copy reference  : 35,845,469.70 ± 1.03% ops/sec
v0.2.1                  : 2,360,341.90 ± 2.09% ops/sec
v0.3.1                  : 2,530,627.75 ± 1.10% ops/sec

mutable version of Trie with 1 members
//-------------------------//
shallow-copy reference  : 614,532.24 ± 1.55% ops/sec
v0.2.1                  : 345,559.32 ± 1.90% ops/sec
v0.3.1                  : 552,055.22 ± 7.75% ops/sec

mutable version of Trie with 10 members
//-------------------------//
shallow-copy reference  : 242,971.00 ± 1.13% ops/sec
v0.2.1                  : 74,049.34 ± 1.23% ops/sec
v0.3.1                  : 202,587.84 ± 1.57% ops/sec

mutable version of Trie with 100 members
//-------------------------//
shallow-copy reference  : 27,944.39 ± 2.23% ops/sec
v0.2.1                  : 4,836.35 ± 1.45% ops/sec
v0.3.1                  : 9,618.62 ± 1.47% ops/sec

mutable version of Trie with 1000 members
//-------------------------//
shallow-copy reference  : 2,813.12 ± 1.23% ops/sec
v0.2.1                  : 273.59 ± 2.28% ops/sec
v0.3.1                  : 879.25 ± 1.80% ops/sec

keys of Trie with 1 members
//-------------------------//
shallow-copy reference  : 11,214,744.36 ± 0.89% ops/sec
v0.3.1                  : 1,060,349.34 ± 0.77% ops/sec

keys of Trie with 10 members
//-------------------------//
shallow-copy reference  : 530,363.78 ± 1.15% ops/sec
v0.3.1                  : 103,964.29 ± 1.15% ops/sec

keys of Trie with 100 members
//-------------------------//
shallow-copy reference  : 64,794.20 ± 1.51% ops/sec
v0.3.1                  : 12,865.80 ± 1.83% ops/sec

keys of Trie with 1000 members
//-------------------------//
shallow-copy reference  : 6,164.72 ± 1.15% ops/sec
v0.3.1                  : 1,158.38 ± 1.35% ops/sec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant