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

V8: reduce number of polymorphic/megamorphic states #600

Merged
merged 2 commits into from
Jul 6, 2024

Conversation

Nmzik
Copy link
Contributor

@Nmzik Nmzik commented Jul 5, 2024

While inspecting the inner workings of the V8 engine via the V8 trace log, I noticed a few minor issues that can potentially lead to the generation of more optimized code.
As an example:
Screenshot 2024-05-28 191657

@Nmzik Nmzik changed the title V8: reduce number of polymorphic/megamorphic functions V8: reduce number of polymorphic/megamorphic states Jul 5, 2024
@@ -274,6 +274,9 @@ export class TilesRendererBase {

tile.__basePath = tileSetDir;

tile._loadIndex = 0;
tile.__lastFrameVisited = undefined;
Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you! This is a good change. Can we initialize this value to - 1 instead of undefined, instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@gkjohnson Done

@gkjohnson
Copy link
Contributor

Great, thank you!

@gkjohnson gkjohnson merged commit 202c221 into NASA-AMMOS:master Jul 6, 2024
2 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.

None yet

2 participants