Speed Matters: A Deep Dive into API Optimization