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

[WIP] avm2: Store resolved function param types #11954

Closed
wants to merge 1 commit into from

Conversation

adrian17
Copy link
Collaborator

@adrian17 adrian17 commented Jul 8, 2023

It's an ugly WIP-POC-prototype thing. ResolvedParamConfig feels silly, maybe new gc-arena's Cell-like apis would help clean it up.
(I also wish the signature stuff was unified/shared between native and bytecode method types.)
Now that has_class_in_chain PR is merged, this passes all tests c:

This removes all runtime parameter type name lookups from function calls. In my microbenchmarks, for function f(a: int, b: int, c: int, d: int, e: int), this speeds up calls by ~30%.

The remaining overhead is

  • mostly: UpdateContext cloning
  • secondly: copying the arguments vec (twice!)
  • other than that: general push/pop overhead

@Lord-McSweeney
Copy link
Collaborator

Superseded by #15884.

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