Optimize ARM Algorithm