Skip to content

Instantly share code, notes, and snippets.

@rainiera
Last active August 29, 2015 14:18
Show Gist options
  • Save rainiera/bfa75fc406c50920d24c to your computer and use it in GitHub Desktop.
Save rainiera/bfa75fc406c50920d24c to your computer and use it in GitHub Desktop.
Set implementation comparison
* (time in seconds)
*
* Title kb Total Distinct
*
* The Cat In The Hat 7 504 1622
* SortedSet time: 0.0343
* UnsortedSet time: 0.0169
* Java HashSet time: 0.0128
* Java TreeSet time: 0.0141
*
* Hamlet 184 32230 8258
* SortedSet time: 0.8923
* UnsortedSet time: 0.6058
* Java HashSet time: 0.0345
* Java TreeSet time: 0.0341
*
* Scaramouche 742 127668 19026
* SortedSet time: 7.2803
* UnsortedSet time: 2.9599
* Java HashSet time: 0.1045
* Java TreeSet time: 0.1056
*
* Complete Shakespeare 5600 904061 67780
* SortedSet time: 249.8820
* UnsortedSet time: 78.454
* Java HashSet time: 0.7310
* Java TreeSet time: 0.7681
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment