Fixed spped degradation: set arrays sizes & data types
More speed boost: use typed array for hash tables