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

Run blocking code on the compute pool more carefully #2735

Merged
merged 4 commits into from
Jan 8, 2022
Merged

Run blocking code on the compute pool more carefully #2735

merged 4 commits into from
Jan 8, 2022

Conversation

vasilmkd
Copy link
Member

@vasilmkd vasilmkd commented Jan 8, 2022

Only run blocking code if the worker thread matches the compute runtime.

Copy link
Member

@djspiewak djspiewak left a comment

Choose a reason for hiding this comment

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

Nice

@vasilmkd
Copy link
Member Author

vasilmkd commented Jan 8, 2022

Before you merge, I'm running benchmarks just to check for regressions.

@djspiewak djspiewak added this to the 3.3.4 milestone Jan 8, 2022
@vasilmkd
Copy link
Member Author

vasilmkd commented Jan 8, 2022

Benchmark runs:

Original PR:

Benchmark                        (size)   Mode  Cnt     Score     Error  Units
BlockingBenchmark.blockThenCede   10000  thrpt   20     6.229 ±   0.299  ops/s
BlockingBenchmark.coarse          10000  thrpt   20  3565.953 ± 105.111  ops/s
BlockingBenchmark.fine            10000  thrpt   20   758.839 ±  19.670  ops/s
BlockingBenchmark.nested          10000  thrpt   20   729.449 ±  12.753  ops/s

This PR:

Benchmark                        (size)   Mode  Cnt     Score     Error  Units
BlockingBenchmark.blockThenCede   10000  thrpt   20     6.481 ±   0.274  ops/s
BlockingBenchmark.coarse          10000  thrpt   20  3481.849 ± 111.972  ops/s
BlockingBenchmark.fine            10000  thrpt   20   771.115 ±   7.107  ops/s
BlockingBenchmark.nested          10000  thrpt   20   752.231 ±   8.088  ops/s

No issues. We can merge.

@djspiewak
Copy link
Member

Excellent work!

@djspiewak djspiewak merged commit e216853 into typelevel:series/3.3.x Jan 8, 2022
@vasilmkd vasilmkd deleted the run-blocking-carefully branch January 8, 2022 22:43
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