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

Remove the skip-when-done in selects #41

Merged
merged 1 commit into from
Feb 7, 2024
Merged

Remove the skip-when-done in selects #41

merged 1 commit into from
Feb 7, 2024

Conversation

adamw
Copy link
Member

@adamw adamw commented Feb 7, 2024

Closes #40

The skipping had a non-negligible performance impact, it's better to give control to the users

Copy link

github-actions bot commented Feb 7, 2024

Benchmark results
Java:
(capacity)  (chainLength)  Mode  Cnt     Score     Error  Units
BufferedBenchmark.arrayBlockingQueue             1            N/A  avgt    5  1061.400 ± 133.222  ns/op
BufferedBenchmark.arrayBlockingQueue            10            N/A  avgt    5   216.076 ±  44.988  ns/op
BufferedBenchmark.arrayBlockingQueue           100            N/A  avgt    5   114.979 ±   8.640  ns/op
BufferedBenchmark.channel                        1            N/A  avgt    5   205.979 ±  43.571  ns/op
BufferedBenchmark.channel                       10            N/A  avgt    5   178.879 ±  47.869  ns/op
BufferedBenchmark.channel                      100            N/A  avgt    5   150.038 ±  41.798  ns/op
ChainedBenchmark.channelChain                    0            100  avgt    5  1010.673 ±  17.449  ns/op
ChainedBenchmark.channelChain                    0           1000  avgt    5  1012.303 ±   6.024  ns/op
ChainedBenchmark.channelChain                    0          10000  avgt    5  1036.151 ±  11.669  ns/op
ChainedBenchmark.channelChain                  100            100  avgt    5    30.474 ±   0.695  ns/op
ChainedBenchmark.channelChain                  100           1000  avgt    5    29.281 ±   1.444  ns/op
ChainedBenchmark.channelChain                  100          10000  avgt    5    31.598 ±   1.293  ns/op
ChainedBenchmark.queueChain                      0            100  avgt    5   131.063 ±  33.658  ns/op
ChainedBenchmark.queueChain                      0           1000  avgt    5   131.006 ±  25.327  ns/op
ChainedBenchmark.queueChain                      0          10000  avgt    5   128.781 ±  18.160  ns/op
ChainedBenchmark.queueChain                    100            100  avgt    5    10.571 ±   0.515  ns/op
ChainedBenchmark.queueChain                    100           1000  avgt    5    10.884 ±   0.060  ns/op
ChainedBenchmark.queueChain                    100          10000  avgt    5    10.213 ±   0.453  ns/op
RendezvousBenchmark.channel                    N/A            N/A  avgt    5   178.114 ±  36.489  ns/op
RendezvousBenchmark.exchanger                  N/A            N/A  avgt    5    94.180 ±  26.463  ns/op
RendezvousBenchmark.synchronousQueue           N/A            N/A  avgt    5   605.199 ±  70.727  ns/op
SelectBenchmark.selectWithSingleClause         N/A            N/A  avgt    5   227.974 ± 101.529  ns/op
SelectBenchmark.selectWithTwoClauses           N/A            N/A  avgt    5   204.359 ±  17.681  ns/op

Kotlin:
(capacity)  (chainLength)  Mode  Cnt    Score    Error  Units
BufferedKotlinBenchmark.channel_defaultDispatcher                        1            N/A  avgt    5  114.871 ±  0.446  ns/op
BufferedKotlinBenchmark.channel_defaultDispatcher                       10            N/A  avgt    5   50.824 ±  1.774  ns/op
BufferedKotlinBenchmark.channel_defaultDispatcher                      100            N/A  avgt    5   32.545 ±  1.074  ns/op
ChainedKotlinBenchmark.channelChain_defaultDispatcher                    0            100  avgt    5   74.686 ±  5.148  ns/op
ChainedKotlinBenchmark.channelChain_defaultDispatcher                    0           1000  avgt    5   63.973 ± 10.688  ns/op
ChainedKotlinBenchmark.channelChain_defaultDispatcher                    0          10000  avgt    5   61.703 ±  1.901  ns/op
ChainedKotlinBenchmark.channelChain_defaultDispatcher                  100            100  avgt    5   13.667 ±  0.221  ns/op
ChainedKotlinBenchmark.channelChain_defaultDispatcher                  100           1000  avgt    5   13.101 ±  0.471  ns/op
ChainedKotlinBenchmark.channelChain_defaultDispatcher                  100          10000  avgt    5   15.148 ±  0.585  ns/op
ChainedKotlinBenchmark.channelChain_eventLoop                            0            100  avgt    5   91.823 ±  4.077  ns/op
ChainedKotlinBenchmark.channelChain_eventLoop                            0           1000  avgt    5  160.407 ± 13.771  ns/op
ChainedKotlinBenchmark.channelChain_eventLoop                            0          10000  avgt    5  101.670 ± 16.674  ns/op
ChainedKotlinBenchmark.channelChain_eventLoop                          100            100  avgt    5   29.764 ±  0.351  ns/op
ChainedKotlinBenchmark.channelChain_eventLoop                          100           1000  avgt    5   31.678 ±  0.404  ns/op
ChainedKotlinBenchmark.channelChain_eventLoop                          100          10000  avgt    5   32.070 ±  0.785  ns/op
RendezvousKotlinBenchmark.channel_defaultDispatcher                    N/A            N/A  avgt    5  142.247 ±  1.944  ns/op
SelectKotlinBenchmark.selectWithSingleClause_defaultDispatcher         N/A            N/A  avgt    5  252.869 ±  8.839  ns/op
SelectKotlinBenchmark.selectWithTwoClauses_defaultDispatcher           N/A            N/A  avgt    5  361.351 ± 11.390  ns/op

@adamw adamw merged commit 934b312 into main Feb 7, 2024
4 checks passed
@adamw adamw deleted the remove-skip-done branch February 7, 2024 16:10
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.

Remove filtering done channels in select
1 participant