Graphics program performance optimization