Skip to content

Commit d5f8412

Browse files
authored
Remove old/unused BENCHMARK setting (#20772)
1 parent 1ef2165 commit d5f8412

File tree

5 files changed

+6
-26
lines changed

5 files changed

+6
-26
lines changed

ChangeLog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@ See docs/process.md for more on how version tagging works.
3535
emscripten you can use the `-sPOLYFILL=0` setting. (#20700)
3636
- libcxx, libcxxabi, libunwind, and compiler-rt were updated to LLVM 17.0.4.
3737
(#20705, #20707, and #20708)
38+
- Remove `BENCHMARK` setting. That has not been used by the benchmark suite for
39+
some time now (at least not by default), and is much less useful these days
40+
given lazy compilation in VMs (which makes it impossible to truly benchmark
41+
execution separately from compilation, which `BENCHMARK` hoped to do).
3842

3943
3.1.49 - 11/14/23
4044
-----------------

src/postamble.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,6 @@ function callMain() {
8282
#endif // MAIN_READS_PARAMS
8383

8484
try {
85-
#if BENCHMARK
86-
var start = Date.now();
87-
#endif
88-
8985
#if ABORT_ON_WASM_EXCEPTIONS
9086
// See abortWrapperDepth in preamble.js!
9187
abortWrapperDepth += 1;
@@ -100,10 +96,6 @@ function callMain() {
10096
var ret = entryFunction(argc, {{{ to64('argv') }}});
10197
#endif // STANDALONE_WASM
10298

103-
#if BENCHMARK
104-
Module.realPrint('main() took ' + (Date.now() - start) + ' milliseconds');
105-
#endif
106-
10799
#if ASYNCIFY == 2 && !PROXY_TO_PTHREAD
108100
// The current spec of JSPI returns a promise only if the function suspends
109101
// and a plain value otherwise. This will likely change:

src/preamble.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@
1414
// An online HTML version (which may be of a different version of Emscripten)
1515
// is up at http://kripken.github.io/emscripten-site/docs/api_reference/preamble.js.html
1616

17-
#if BENCHMARK
18-
Module.realPrint = out;
19-
out = err = () => {};
20-
#endif
21-
2217
#if RELOCATABLE
2318
{{{ makeModuleReceiveWithVar('dynamicLibraries', undefined, '[]', true) }}}
2419
#endif

src/settings.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1268,11 +1268,6 @@ var EXPORT_ES6 = false;
12681268
// [link]
12691269
var USE_ES6_IMPORT_META = true;
12701270

1271-
// If 1, will just time how long main() takes to execute, and not print out
1272-
// anything at all whatsoever. This is useful for benchmarking.
1273-
// [link]
1274-
var BENCHMARK = false;
1275-
12761271
// Global variable to export the module as for environments without a
12771272
// standardized module loading system (e.g. the browser and SM shell).
12781273
// [link]

test/test_benchmark.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@
4444

4545
non_core = unittest.skipIf(CORE_BENCHMARKS, "only running core benchmarks")
4646

47-
IGNORE_COMPILATION = 0
48-
4947
OPTIMIZATIONS = '-O3'
5048

5149
PROFILING = 0
@@ -73,10 +71,7 @@ def bench(self, args, output_parser=None, reps=TEST_REPS, expected_output=None):
7371
raise ValueError('Incorrect benchmark output:\n' + output)
7472

7573
if not output_parser or args == ['0']: # if arg is 0, we are not running code, and have no output to parse
76-
if IGNORE_COMPILATION:
77-
curr = float(re.search(r'took +([\d\.]+) milliseconds', output).group(1)) / 1000
78-
else:
79-
curr = time.time() - start
74+
curr = time.time() - start
8075
else:
8176
try:
8277
curr = output_parser(output)
@@ -206,7 +201,6 @@ def build(self, parent, filename, args, shared_args, emcc_args, native_args, nat
206201
OPTIMIZATIONS,
207202
'-sINITIAL_MEMORY=256MB',
208203
'-sENVIRONMENT=node,shell',
209-
'-sBENCHMARK=%d' % (1 if IGNORE_COMPILATION and not has_output_parser else 0),
210204
'-o', final
211205
] + LLVM_FEATURE_FLAGS
212206
if shared_args:
@@ -369,7 +363,7 @@ def setUpClass(cls):
369363
for benchmarker in benchmarkers:
370364
benchmarker.prepare()
371365

372-
fingerprint = ['ignoring compilation' if IGNORE_COMPILATION else 'including compilation', time.asctime()]
366+
fingerprint = ['including compilation', time.asctime()]
373367
try:
374368
fingerprint.append('em: ' + run_process(['git', 'show'], stdout=PIPE).stdout.splitlines()[0])
375369
except Exception:

0 commit comments

Comments
 (0)