Tried to optimize by allocating all memory for arrays at the beginning
Merge branch 'master' of https://github.com/wzheng/speedy
Fixed compile error