MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / do_toolchain_benchmark

Method do_toolchain_benchmark

test/test_benchmark.py:570–584  ·  view source on GitHub ↗
(self, args)

Source from the content-addressed store, hash-verified

568 self.do_benchmark('primes' if check else 'primes-nocheck', src, 'lastprime:' if check else '', shared_args=['-DCHECK'] if check else [])
569
570 def do_toolchain_benchmark(self, args):
571 # TODO: Perhaps this can be merged with the regular `do_benchmark` somehow.
572 benchmarkers = [
573 named_benchmarkers['clang-build'],
574 named_benchmarkers['emcc-build'],
575 ]
576 baseline = None
577 print()
578 for b in benchmarkers:
579 b.bench(args)
580 b.display(baseline)
581 if not baseline:
582 # Use the first benchmarker as the baseline. Other benchmarkers can then
583 # report relative performance compared to this.
584 baseline = b
585
586 def test_compile_noop(self):
587 self.do_toolchain_benchmark(['--version'])

Callers 2

test_compile_noopMethod · 0.95
test_compile_helloMethod · 0.95

Calls 3

benchMethod · 0.80
displayMethod · 0.80
printFunction · 0.50

Tested by

no test coverage detected