diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-12-21 12:23:23 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-12-21 12:23:23 -0800 |
commit | 50c60be0d614f181783f5be64e1edc626dcfa3a5 (patch) | |
tree | 86aef8cb7a58c14c5a1daa2599d12d479816d67e /tests/test_benchmark.py | |
parent | 8dd12f6e6c85f194309084530a95bced231f0704 (diff) |
benchmark fastcomp
Diffstat (limited to 'tests/test_benchmark.py')
-rw-r--r-- | tests/test_benchmark.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/test_benchmark.py b/tests/test_benchmark.py index 284d7c22..bba7c2f7 100644 --- a/tests/test_benchmark.py +++ b/tests/test_benchmark.py @@ -77,10 +77,13 @@ class NativeBenchmarker(Benchmarker): return process.communicate()[0] class JSBenchmarker(Benchmarker): - def __init__(self, name, engine, extra_args=[]): + def __init__(self, name, engine, extra_args=[], env={}): self.name = name self.engine = engine self.extra_args = extra_args + self.env = os.environ.copy() + for k, v in env.iteritems(): + self.env[k] = v def build(self, parent, filename, args, shared_args, emcc_args, native_args, native_exec, lib_builder): self.filename = filename @@ -104,7 +107,7 @@ process(sys.argv[1]) '-s', 'TOTAL_MEMORY=128*1024*1024', #'--closure', '1', #'-g', - '-o', filename + '.js'] + shared_args + emcc_args + self.extra_args, stdout=PIPE, stderr=PIPE).communicate() + '-o', filename + '.js'] + shared_args + emcc_args + self.extra_args, stdout=PIPE, stderr=PIPE, env=self.env).communicate() assert os.path.exists(filename + '.js'), 'Failed to compile file: ' + output[0] def run(self, args): @@ -113,12 +116,13 @@ process(sys.argv[1]) # Benchmarkers benchmarkers = [ NativeBenchmarker('clang', CLANG_CC, CLANG), - NativeBenchmarker('gcc', 'gcc', 'g++'), - JSBenchmarker('sm-f32', SPIDERMONKEY_ENGINE, ['-s', 'PRECISE_F32=2']), + #NativeBenchmarker('gcc', 'gcc', 'g++'), + #JSBenchmarker('sm-f32', SPIDERMONKEY_ENGINE, ['-s', 'PRECISE_F32=2']), JSBenchmarker('sm', SPIDERMONKEY_ENGINE), + JSBenchmarker('sm-fc', SPIDERMONKEY_ENGINE, env={ 'EMCC_FAST_COMPILER': '1' }), #JSBenchmarker('sm-noasm', SPIDERMONKEY_ENGINE + ['--no-asmjs']), #JSBenchmarker('sm-noasm-f32', SPIDERMONKEY_ENGINE + ['--no-asmjs'], ['-s', 'PRECISE_F32=2']), - JSBenchmarker('v8', V8_ENGINE) + #JSBenchmarker('v8', V8_ENGINE) ] class benchmark(RunnerCore): |