Massive performance Boost

By initializing array capacity beforehand and avoiding creation of a dictionary, you can speed things up ten-fold.