PERF Run faster on Linux - #250
Conversation
… needs to create and then check a long list of things in /proc/self?
ogrisel
left a comment
There was a problem hiding this comment.
Thanks for the fix. LGTM but I think we could improve the testing harness as follows:
| # enabling it on GIL Python too once threadpoolctl supports 3.15. | ||
| and not ( | ||
| sys.version_info[:2] >= (3, 15) | ||
| and not getattr(sys, "_is_gil_enabled", lambda: True)() |
There was a problem hiding this comment.
Let's add a linux free-threading CPython 3.15 config to the CI to exercise this condition.
There was a problem hiding this comment.
I tried, but it's a real pain to get things going with release candidates. I suggest waiting until it's no longer pre-release and doing it in #251.
|
Thank you, I'll address these today hopefully. |
Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
Also move some checks out to save a little time.
|
I'm getting close to just giving up on 3.15 environments for now; either one would switch to installing Python via GitHub Actions, or just wait a month or three until conda-forge is caught up. |
|
Yeah I'm giving up on this for now. Will revert those changes. |
|
Did you run the tests locally on free-threading Python 3.15? EDIT: I just did and everything looks good. |
ogrisel
left a comment
There was a problem hiding this comment.
LGTM. Will merge and follow-up with a dedicated PR to add 3.15 CI config and official support in the metadata.
joblib#250 already marks the OpenMP test helpers as free-threading compatible in the pyx files, so restore the setup scripts to the plain compiler_directives dicts. Use FREETHREADING=1 for the RC free-threaded jobs to match the existing 3.14 CI flag. Co-authored-by: Olivier Grisel <olivier.grisel@ensta.org>
|
Thank you! |
Fixes #248
Benchmarked with
python benchmarks/bench_context_manager_overhead.py --n-calls 10_000 --import numpyon 3.14 free-threaded.0.223 +/-0.256 ms0.127 +/-0.251 msSwitch to
dllist()is even faster, but not a good idea before Python 3.15.