Skip to content
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

Optimize performance in test262 #1671

Merged
merged 2 commits into from
Oct 4, 2024
Merged

Conversation

rPraml
Copy link
Contributor

@rPraml rPraml commented Oct 2, 2024

This PR targets two issues I found with a profiler, while running the 262 test suite:

  • The method addTestFiles has a nested loop with a complexity of O(n^2). I've replaced this with a hashmap, that improves startup time from ~3 sec down to <1 sec
  • The getSourcePositionFromStack uses the more efficient StackWalker now

Copy link
Collaborator

@rbri rbri left a comment

Choose a reason for hiding this comment

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

LGTM

@rbri
Copy link
Collaborator

rbri commented Oct 3, 2024

NativeJavaListTest > length FAILED
org.junit.ComparisonFailure at NativeJavaListTest.java:161

RegexpTest > unsupportedFlagCtor FAILED
org.junit.ComparisonFailure at RegexpTest.java:71

@rPraml
Copy link
Contributor Author

rPraml commented Oct 4, 2024

Fixed the condition in the "filter"method. Now ShellTimerTest fails. Waiting for #1672, then I'll do a rebase

@rbri
Copy link
Collaborator

rbri commented Oct 4, 2024

@rPraml #1672 is merged go ahead :-)

/** Returns the current filename in the java stack. */
@SuppressWarnings("AndroidJdkLibsChecker")
// Android uses interpreter, so we should not get here.
static String getSourcePositionFromJavaStack(int[] linep) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Rebase is done. Maybe someone can confirm, that android always uses interpreter, so we should not get here ;)

Copy link
Collaborator

Choose a reason for hiding this comment

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

see @gbrail's comment on #1658

@rbri rbri merged commit f3f1b3f into mozilla:master Oct 4, 2024
1 check passed
@rbri
Copy link
Collaborator

rbri commented Oct 4, 2024

@rPraml thanks for that, faster tests are always a good thing

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