Codes for efficient global optimization