Machine learning algorithm design for hardware performance optimization