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

rpython: simplify and probably remove a performance bottleneck #698

Merged
merged 1 commit into from
Oct 16, 2024

Conversation

asarhaddon
Copy link
Contributor

Traverse environments without recursion. Unwrap the key once. Do not wrap DEBUG-EVAL on each evaluation.
Spare two intermediate MalLists for the 'do' special form.

Traverse environments without recursion.  Unwrap the key once.
Do not wrap DEBUG-EVAL on each evaluation.
Spare two intermediate MalLists for the 'do' special form.
@kanaka kanaka merged commit a9a6d90 into kanaka:master Oct 16, 2024
4 checks passed
@kanaka
Copy link
Owner

kanaka commented Oct 16, 2024

Looks good. I've merged them.

Here are some quick tests on my local machine:

  • 214,000 iters/sec -> before these changes
  • 282,000 iters/sec -> with these changes
  • 379,000 iters/sec -> with these but with DEBUG-EVAL commented out

Current Java implementation is 274,000 iters/sec on this machine.

It's definitely a notable improvement. I don't know why commenting out that single conditional makes such a big change. rpython's optimizations are amazing (and SLOW to perform) but also sometimes opaque in why little things can make such a big difference (at least they are to me).

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