optimize library for speed native asmfitting