Skip to content

Optimize core*.test_avx to run faster. #24564

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 13, 2025
Merged

Conversation

juj
Copy link
Collaborator

@juj juj commented Jun 13, 2025

Give the same no-inline treatment to AVX test than the earlier SSE 4.1 test.

Before:

test_avx (test_core.core0.test_avx) ... ok (14.30s)
test_avx (test_core.core1.test_avx) ... ok (15.00s)
test_avx (test_core.core_2gb.test_avx) ... ok (14.43s)
test_avx (test_core.core2.test_avx) ... ok (17.92s)
test_avx (test_core.corez.test_avx) ... ok (42.94s)
test_avx (test_core.cores.test_avx) ... ok (65.45s)
test_avx (test_core.core3.test_avx) ... ok (1026.48s)

After:

test_avx (test_core.core0.test_avx) ... ok (14.70s)
test_avx (test_core.core1.test_avx) ... ok (13.78s)
test_avx (test_core.core_2gb.test_avx) ... ok (15.00s)
test_avx (test_core.core2.test_avx) ... ok (15.95s)
test_avx (test_core.corez.test_avx) ... ok (35.31s)
test_avx (test_core.cores.test_avx) ... ok (39.06s)
test_avx (test_core.core3.test_avx) ... ok (45.72s)

Before:

test_avx (test_core.core0.test_avx) ... ok (14.30s)
test_avx (test_core.core1.test_avx) ... ok (15.00s)
test_avx (test_core.core_2gb.test_avx) ... ok (14.43s)
test_avx (test_core.core2.test_avx) ... ok (17.92s)
test_avx (test_core.corez.test_avx) ... ok (42.94s)
test_avx (test_core.cores.test_avx) ... ok (65.45s)
test_avx (test_core.core3.test_avx) ... ok (1026.48s)

After:

test_avx (test_core.core0.test_avx) ... ok (14.70s)
test_avx (test_core.core1.test_avx) ... ok (13.78s)
test_avx (test_core.core_2gb.test_avx) ... ok (15.00s)
test_avx (test_core.core2.test_avx) ... ok (15.95s)
test_avx (test_core.corez.test_avx) ... ok (35.31s)
test_avx (test_core.cores.test_avx) ... ok (39.06s)
test_avx (test_core.core3.test_avx) ... ok (45.72s)
@@ -6675,7 +6675,7 @@ def test_avx(self, args):
self.run_process([shared.CLANG_CXX, src, '-mavx', '-Wno-argument-outside-range', '-Wpedantic', '-o', 'test_avx', '-D_CRT_SECURE_NO_WARNINGS=1'] + clang_native.get_clang_native_args(), stdout=PIPE)
native_result = self.run_process('./test_avx', stdout=PIPE).stdout

self.emcc_args += ['-I' + test_file('sse'), '-mavx', '-Wno-argument-outside-range', '-sSTACK_SIZE=1MB'] + args
self.emcc_args += ['-I' + test_file('sse'), '-mavx', '-fno-inline-functions', '-Wno-argument-outside-range', '-sSTACK_SIZE=1MB'] + args
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need both this extra flag and the NOINLINE in the source?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There may be redundancy, but I find it's documentative as well.

@juj juj enabled auto-merge (squash) June 13, 2025 21:37
@juj juj merged commit db66f17 into emscripten-core:main Jun 13, 2025
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants