python / python/cpython

JIT: Use pthread_jit_write_protect_np on macOS

Offen
#126,195 1 Kommentar 1 Reaktion 1 zugewiesene Person Auf GitHub ansehen

@diegorusso arbeitet bereits daran.

Seit 30.10.2024.

OS-mac performance topic-JIT type-feature
Vorherrschende Sprache
Python
Sterne
77.2k
Forks
36k
PR-Merge-Kennzahlen
PR-Kennzahlen ausstehend

Beschreibung

Feature or enhancement

Proposal:

The proposal is an internal implementation of the JIT and it transparent to the user.

Has this already been discussed elsewhere?

I have already discussed this feature proposal on Discourse

Links to previous discussion of this feature:

Not on Discourse, I've had extensive discussion about this with @brandtbucher and created a prototype that we benchmarked using the faster-cpython infrastructure. The full results are here: https://github.com/faster-cpython/benchmarking-public/tree/main/results/bm-20241018-3.14.0a1+-f74cd79-JIT

On macOS on Apple Silicon there is an overall 1.4% speed improvement by replacing the mprotect with pthread_jit_write_protect_np.

Linked PRs
  • gh-126196

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.