Skip to content

Instantly share code, notes, and snippets.

@otiose
otiose / README.md
Last active August 29, 2015 14:08
Comparison of a Weighted Quick Find with Path Compression Union Find algorithm in Java and Swift

Intro

All the Java code here comes from Algorithms, 4th Edition, by Robert Sedgewick and Kevin Wayne.

The Swift code was written by myself. Although it is mainly a direct port of the Java code :)

The goal was to see how fast Swift would compare to a language such as Java in a somewhat non-trivial case.

The input used was largeUF.txt, also provided by the Algorithms book. It is about 27mb, so I left it out of the gist :)

--------------------------------------------------------------------------------
Bootstrapping all the repositories
--------------------------------------------------------------------------------
Bootstrapping CLAide
rake --no-search bootstrap
/Users/a12986/.rvm/gems/ruby-2.0.0-p247@global/bin/bundle
--------------------------------------------------------------------------------
Installing gems
@otiose
otiose / gist:8330774
Created January 9, 2014 07:44
Stuff To Look At Later
maqr otiose|work: if you think that's neat, check out modernizr and the associated polyfills :P