GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GH-115802: JIT "small" code for macOS and Linux by brandtbucher · Pull Request #115826 · python/cpython

Conversation

@brandtbucher

@brandtbucher brandtbucher commented Feb 22, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Windows will come next, since that uses a different mechanism.

Somewhere in the neighborhood of ~0-3% faster, as expected.

  • Issue: Improving JIT code quality #115802

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

stonebig reacted with heart emoji
All reactions
  • ❤️ 1 reaction
brandtbucher added 7 commits February 21, 2024 23:15
@brandtbucher
Implement the small code model for x86_64 and aarch64 macOS and Linux
52bb3da
@brandtbucher
blacken
81fe5ed
@brandtbucher
Remove references to IMAGE_REL_AMD64_REL32 and clean up comments
36de1cd
@brandtbucher
Add comment
74860c1
@brandtbucher
Move assert back
aa53fab
@brandtbucher
fixup
462095c
@brandtbucher
Catch up with main
c28b7de
@brandtbucher brandtbucher added performance Performance or resource usage interpreter-core (Objects, Python, Grammar, and Parser dirs) labels Feb 22, 2024
@brandtbucher brandtbucher self-assigned this Feb 22, 2024
@bedevere-app bedevere-app Bot mentioned this pull request Feb 22, 2024
Improving JIT code quality #115802
Closed
8 of 13 tasks
@brandtbucher brandtbucher added the skip news label Feb 22, 2024
@brandtbucher
brandtbucher marked this pull request as ready for review February 22, 2024 19:34
@bedevere-app bedevere-app Bot added the awaiting core review label Feb 22, 2024
@brandtbucher
brandtbucher requested a review from markshannon February 22, 2024 19:34
@brandtbucher
brandtbucher merged commit 7259480 into python:main Feb 26, 2024
@bedevere-app bedevere-app Bot removed the awaiting core review label Feb 26, 2024
markshannon
markshannon requested changes Feb 26, 2024
View reviewed changes

@markshannon markshannon left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I minor issue with an assert, otherwise looks good.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Python/jit.c
{
unsigned char rd = get_bits(loc32[0], 0, 5);
assert(IS_AARCH64_LDR_OR_STR(loc32[1]));
unsigned char rt = get_bits(loc32[1], 0, 5);

@markshannon markshannon Feb 26, 2024

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

rt and rn are only used in the assert, so I'm getting an unused variable warning.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Python/jit.c
assert(IS_AARCH64_LDR_OR_STR(loc32[1]));
unsigned char rt = get_bits(loc32[1], 0, 5);
unsigned char rn = get_bits(loc32[1], 5, 5);
assert(rd == rn && rn == rt);

@markshannon markshannon Feb 26, 2024

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Suggested change
assert(rd == rn && rn == rt);
assert(rd == get_bits(loc32[1], 5, 5) && rd == get_bits(loc32[1], 0, 5));

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Tools/jit/_targets.py
"-fno-jump-tables",
# Position-independent code adds indirection to every load and jump:
"-fno-pic",
"-fno-plt",

@markshannon markshannon Feb 26, 2024

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Could you make sure each option has a comment saying what it does.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-app bedevere-app Bot added the awaiting changes label Feb 26, 2024
@bedevere-app

bedevere-app Bot commented Feb 26, 2024

Copy link
Copy Markdown

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@brandtbucher

brandtbucher commented Feb 26, 2024

Copy link
Copy Markdown
Member Author

Sorry, looks like I merged just before your review. I'll address these in the follow-up Windows PR.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@brandtbucher brandtbucher mentioned this pull request Feb 26, 2024
GH-115802: JIT "small" code for Windows #115964
Merged
woodruffw pushed a commit to woodruffw-forks/cpython that referenced this pull request Mar 4, 2024
@brandtbucher @woodruffw
pythonGH-115802: JIT "small" code for macOS and Linux (pythonGH-115826)
9b82f99
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 25, 2024
@brandtbucher @adorilson
pythonGH-115802: JIT "small" code for macOS and Linux (pythonGH-115826)
a12e0a7
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
@brandtbucher @diegorusso
pythonGH-115802: JIT "small" code for macOS and Linux (pythonGH-115826)
ec4951d
@brandtbucher brandtbucher added the topic-JIT label May 31, 2024
LukasWoodtli pushed a commit to LukasWoodtli/cpython that referenced this pull request Jan 22, 2025
@brandtbucher @LukasWoodtli
pythonGH-115802: JIT "small" code for macOS and Linux (pythonGH-115826)
100b014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@markshannon markshannon markshannon requested changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@brandtbucher brandtbucher

Labels

awaiting changes interpreter-core (Objects, Python, Grammar, and Parser dirs) performance Performance or resource usage skip news topic-JIT

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@brandtbucher @markshannon
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.