Skip to content

Instantly share code, notes, and snippets.

@cer
Created August 14, 2015 00:03
Show Gist options
  • Save cer/267eb4c752ec001ba50b to your computer and use it in GitHub Desktop.
Save cer/267eb4c752ec001ba50b to your computer and use it in GitHub Desktop.
val children = Set("a", "b", "c")
var knownChildren = Map[String, String]()
val newChildren = Map[String, String]()
for (i <- 1 to 1000*1000) {
if (i % 1000 == 0) println(knownChildren.size)
knownChildren = knownChildren.filterKeys(children.contains) ++ newChildren
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment