use sort.h macros instead of qsort (~2x speedup)
avoid unnecessary function calls
ignore autogenerated files