parameters: (old_results, new_result)
return_statement: return old_results
docstring: Adds a new result to the results JSON list; filters for duplicate entries and saves the best performing one
docstring_summary: Adds a new result to the results JSON list; filters for duplicate entries and saves the best performing one
docstring_tokens: Adds a new result to the results JSON list ; filters for duplicate entries and saves the best performing one
function: def combine_result(old_results, new_result):
      """Adds a new result to the results JSON list; filters for duplicate entries and saves the best performing one"""
  
      # Loops over all existing results to test for already existing entries with these parameters
      for old_result in old_results:
  
          # Verify whether the results match
          equal = new_result["parameters"] == old_result["parameters"]
  
          # They match: keep only the one with the minimum execution time
          if equal:
              old_result["time"] = min(old_result["time"], new_result["time"])
              return old_results
  
      # No match found: append a new result
      old_results.append(new_result)
      return old_results
function_tokens: def combine_result ( old_results , new_result ) : # Loops over all existing results to test for already existing entries with these parameters for old_result in old_results : # Verify whether the results match equal = new_result [ "parameters" ] == old_result [ "parameters" ] # They match: keep only the one with the minimum execution time if equal : old_result [ "time" ] = min ( old_result [ "time" ] , new_result [ "time" ] ) return old_results # No match found: append a new result old_results . append ( new_result ) return old_results