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

Separate Sink, Source & CloseableChannel interfaces #32

Merged
merged 1 commit into from
Jan 22, 2024
Merged

Conversation

adamw
Copy link
Member

@adamw adamw commented Jan 22, 2024

Closes #11

Copy link

Benchmark results
Java:
(capacity)  (chainLength)  Mode  Cnt     Score    Error  Units
BufferedBenchmark.arrayBlockingQueue             1            N/A  avgt    5  1035.919 ± 74.658  ns/op
BufferedBenchmark.arrayBlockingQueue            10            N/A  avgt    5   179.955 ± 48.918  ns/op
BufferedBenchmark.arrayBlockingQueue           100            N/A  avgt    5   114.026 ±  3.927  ns/op
BufferedBenchmark.channel                        1            N/A  avgt    5   201.463 ± 57.116  ns/op
BufferedBenchmark.channel                       10            N/A  avgt    5   185.132 ± 40.618  ns/op
BufferedBenchmark.channel                      100            N/A  avgt    5   156.564 ± 32.471  ns/op
ChainedBenchmark.channelChain                    0            100  avgt    5  1015.517 ±  7.093  ns/op
ChainedBenchmark.channelChain                    0           1000  avgt    5  1017.394 ± 25.045  ns/op
ChainedBenchmark.channelChain                    0          10000  avgt    5  1024.424 ± 22.666  ns/op
ChainedBenchmark.channelChain                  100            100  avgt    5    30.934 ±  0.504  ns/op
ChainedBenchmark.channelChain                  100           1000  avgt    5    30.089 ±  1.029  ns/op
ChainedBenchmark.channelChain                  100          10000  avgt    5    32.276 ±  2.031  ns/op
ChainedBenchmark.queueChain                      0            100  avgt    5   130.703 ± 24.590  ns/op
ChainedBenchmark.queueChain                      0           1000  avgt    5   134.679 ± 22.130  ns/op
ChainedBenchmark.queueChain                      0          10000  avgt    5   131.210 ±  6.941  ns/op
ChainedBenchmark.queueChain                    100            100  avgt    5    11.152 ±  0.316  ns/op
ChainedBenchmark.queueChain                    100           1000  avgt    5    10.923 ±  0.547  ns/op
ChainedBenchmark.queueChain                    100          10000  avgt    5     9.365 ±  0.344  ns/op
RendezvousBenchmark.channel                    N/A            N/A  avgt    5   178.396 ± 39.509  ns/op
RendezvousBenchmark.exchanger                  N/A            N/A  avgt    5    94.380 ± 10.225  ns/op
RendezvousBenchmark.synchronousQueue           N/A            N/A  avgt    5   616.833 ± 17.666  ns/op
SelectBenchmark.selectWithSingleClause         N/A            N/A  avgt    5   225.474 ± 26.958  ns/op
SelectBenchmark.selectWithTwoClauses           N/A            N/A  avgt    5   213.507 ± 14.808  ns/op

Kotlin:
(capacity)  (chainLength)  Mode  Cnt    Score    Error  Units
BufferedKotlinBenchmark.channel_defaultDispatcher                        1            N/A  avgt    5  120.901 ±  0.753  ns/op
BufferedKotlinBenchmark.channel_defaultDispatcher                       10            N/A  avgt    5   54.168 ±  0.653  ns/op
BufferedKotlinBenchmark.channel_defaultDispatcher                      100            N/A  avgt    5   31.581 ±  4.569  ns/op
ChainedKotlinBenchmark.channelChain_defaultDispatcher                    0            100  avgt    5   70.248 ±  3.209  ns/op
ChainedKotlinBenchmark.channelChain_defaultDispatcher                    0           1000  avgt    5   64.599 ±  3.027  ns/op
ChainedKotlinBenchmark.channelChain_defaultDispatcher                    0          10000  avgt    5   60.507 ±  2.063  ns/op
ChainedKotlinBenchmark.channelChain_defaultDispatcher                  100            100  avgt    5   13.745 ±  0.399  ns/op
ChainedKotlinBenchmark.channelChain_defaultDispatcher                  100           1000  avgt    5   13.106 ±  0.437  ns/op
ChainedKotlinBenchmark.channelChain_defaultDispatcher                  100          10000  avgt    5   15.156 ±  0.951  ns/op
ChainedKotlinBenchmark.channelChain_eventLoop                            0            100  avgt    5  102.830 ±  8.335  ns/op
ChainedKotlinBenchmark.channelChain_eventLoop                            0           1000  avgt    5  142.288 ± 17.504  ns/op
ChainedKotlinBenchmark.channelChain_eventLoop                            0          10000  avgt    5   95.203 ±  4.529  ns/op
ChainedKotlinBenchmark.channelChain_eventLoop                          100            100  avgt    5   29.820 ±  1.205  ns/op
ChainedKotlinBenchmark.channelChain_eventLoop                          100           1000  avgt    5   28.879 ±  0.387  ns/op
ChainedKotlinBenchmark.channelChain_eventLoop                          100          10000  avgt    5   30.777 ±  0.449  ns/op
RendezvousKotlinBenchmark.channel_defaultDispatcher                    N/A            N/A  avgt    5  142.669 ±  3.832  ns/op
SelectKotlinBenchmark.selectWithSingleClause_defaultDispatcher         N/A            N/A  avgt    5  256.774 ±  0.811  ns/op
SelectKotlinBenchmark.selectWithTwoClauses_defaultDispatcher           N/A            N/A  avgt    5  323.104 ±  1.998  ns/op

@adamw adamw merged commit 9c43ed0 into main Jan 22, 2024
4 checks passed
@adamw adamw deleted the source-sink branch January 22, 2024 16:41
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.

Separate Source and Sink interfaces
1 participant