gcm optimization