Optimizing Performance for the Flash Platform