Forráskód Böngészése

Stop passing the optimization level to performance tests

jonathanvdc 8 éve
szülő
commit
2a87367380
2 módosított fájl, 2 hozzáadás és 17 törlés
  1. 1 16
      performance/code/test_harness.alc
  2. 1 1
      performance/utils.py

+ 1 - 16
performance/code/test_harness.alc

@@ -3,26 +3,11 @@ include "jit.alh"
 
 Void function test_main()
 
-Void function call_function(function_name : String):
-	// Resolve the specified function, and execute it.
-	Element func
-	func = resolve(function_name)
-	func()
-	return!
-
 Void function main():
-	String config
 	Integer start_time
 	Integer end_time
-	config = input()
-	// if (config == "interpreter"):
-		// set_jit_enabled(False)
-
 	start_time = time()
-	// HACK: use `call_function` to hide what would otherwise be a direct call to `test_main`
-	// from the JIT. This prevents the JIT from compiling `test_main` _before_ `config` has
-	// been analyzed.
-	call_function("test_main")
+	test_main()
 	end_time = time()
 	output(end_time - start_time)
 	

+ 1 - 1
performance/utils.py

@@ -244,7 +244,7 @@ def run_perf_test(files, parameters, optimization_level, n_iterations=1):
     for _ in xrange(n_iterations):
         result += float(
             run_file_single_output(
-                files, [optimization_level] + parameters + [0], 'CO',
+                files, parameters + [0], 'CO',
                 optimization_level)) / float(n_iterations)
     return result