Implemented more efficient garbage collectior

from worst case of O(n) -> O(1) - where n is the number of insertions in
a list

So this is a huge improvement, I guess :)
This commit is contained in:
Kevin Jahns
2016-01-23 20:09:30 +01:00
parent 38bf398709
commit 39dc2317b7
3 changed files with 63 additions and 8 deletions

View File

@@ -208,6 +208,7 @@ g.compareAllUsers = async(function * compareAllUsers (users) {
yield* this.os.iterate(this, null, null, function * (o) {
o = Y.utils.copyObject(o)
delete o.origin
delete o.originOf
db1.push(o)
})
})
@@ -222,6 +223,7 @@ g.compareAllUsers = async(function * compareAllUsers (users) {
yield* this.os.iterate(this, null, null, function * (o) {
o = Y.utils.copyObject(o)
delete o.origin
delete o.originOf
expect(db1[count++]).toEqual(o)
})
})