Add *.out to .gitignore
Optimize speed
Use int32 instead of int