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

BENCH add benchmark script for n_jobs=1 #1400

Merged
merged 2 commits into from
Feb 20, 2023

Conversation

tomMoral
Copy link
Contributor

Add a benchmark script to test the overhead of calling joblib with n_jobs=1 vs calling a sequential loop for numpy matrix multiplications with various matrix sizes and for a very fast function (in red).

This gives
image

here, we can see that for small tasks, we have an overhead of roughly x10 per task for tasks that takes 1ms.
This state should be corrected by the changes pushed in #588.

@codecov
Copy link

codecov bot commented Feb 17, 2023

Codecov Report

Base: 94.09% // Head: 94.04% // Decreases project coverage by -0.06% ⚠️

Coverage data is based on head (5dba7c2) compared to base (96c32ef).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1400      +/-   ##
==========================================
- Coverage   94.09%   94.04%   -0.06%     
==========================================
  Files          52       52              
  Lines        7319     7319              
==========================================
- Hits         6887     6883       -4     
- Misses        432      436       +4     
Impacted Files Coverage Δ
joblib/test/test_store_backends.py 94.54% <0.00%> (-3.64%) ⬇️
joblib/pool.py 87.80% <0.00%> (-0.82%) ⬇️
joblib/parallel.py 96.03% <0.00%> (-0.53%) ⬇️
joblib/memory.py 95.52% <0.00%> (+0.26%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Contributor

@ogrisel ogrisel left a comment

Choose a reason for hiding this comment

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

Lgtm

benchmarks/bench_sequential_fast_tasks.py Outdated Show resolved Hide resolved
@tomMoral tomMoral merged commit f599c6b into joblib:master Feb 20, 2023
@tomMoral tomMoral deleted the BENCH_sequential_tasks branch February 20, 2023 10:22
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.

None yet

2 participants