added -funroll-loops, gives slight performance boost