softwaremill / jox

Fast and Scalable Channels in Java
Apache License 2.0
251 stars 8 forks source link

Implement unlimited channels #29

Closed adamw closed 10 months ago

adamw commented 10 months ago

Closes #4

github-actions[bot] commented 10 months ago
Benchmark results ``` Java: (capacity) Mode Cnt Score Error Units BufferedBenchmark.array_blocking_queue 1 avgt 15 1103.693 ± 34.226 ns/op BufferedBenchmark.array_blocking_queue:putToArrayBlockingQueue 1 avgt 15 1103.696 ± 34.224 ns/op BufferedBenchmark.array_blocking_queue:takeFromArrayBlockingQueue 1 avgt 15 1103.691 ± 34.228 ns/op BufferedBenchmark.array_blocking_queue 10 avgt 15 223.870 ± 14.508 ns/op BufferedBenchmark.array_blocking_queue:putToArrayBlockingQueue 10 avgt 15 223.870 ± 14.508 ns/op BufferedBenchmark.array_blocking_queue:takeFromArrayBlockingQueue 10 avgt 15 223.871 ± 14.508 ns/op BufferedBenchmark.array_blocking_queue 100 avgt 15 153.976 ± 18.754 ns/op BufferedBenchmark.array_blocking_queue:putToArrayBlockingQueue 100 avgt 15 153.976 ± 18.754 ns/op BufferedBenchmark.array_blocking_queue:takeFromArrayBlockingQueue 100 avgt 15 153.976 ± 18.754 ns/op BufferedBenchmark.channel 1 avgt 15 192.062 ± 20.342 ns/op BufferedBenchmark.channel:receiveFromChannel 1 avgt 15 192.063 ± 20.342 ns/op BufferedBenchmark.channel:sendToChannel 1 avgt 15 192.061 ± 20.342 ns/op BufferedBenchmark.channel 10 avgt 15 170.121 ± 4.349 ns/op BufferedBenchmark.channel:receiveFromChannel 10 avgt 15 170.122 ± 4.350 ns/op BufferedBenchmark.channel:sendToChannel 10 avgt 15 170.119 ± 4.348 ns/op BufferedBenchmark.channel 100 avgt 15 147.757 ± 11.877 ns/op BufferedBenchmark.channel:receiveFromChannel 100 avgt 15 147.758 ± 11.878 ns/op BufferedBenchmark.channel:sendToChannel 100 avgt 15 147.757 ± 11.875 ns/op BufferedBenchmark.channel_iterative 1 avgt 15 196.643 ± 21.563 ns/op BufferedBenchmark.channel_iterative 10 avgt 15 176.257 ± 10.309 ns/op BufferedBenchmark.channel_iterative 100 avgt 15 127.573 ± 8.374 ns/op RendezvousBenchmark.channel N/A avgt 15 190.160 ± 12.159 ns/op RendezvousBenchmark.channel:receiveFromChannel N/A avgt 15 190.158 ± 12.159 ns/op RendezvousBenchmark.channel:sendToChannel N/A avgt 15 190.161 ± 12.159 ns/op RendezvousBenchmark.channel_iterative N/A avgt 15 195.357 ± 7.100 ns/op RendezvousBenchmark.exchanger N/A avgt 15 100.252 ± 4.378 ns/op RendezvousBenchmark.exchanger:exchange1 N/A avgt 15 100.252 ± 4.378 ns/op RendezvousBenchmark.exchanger:exchange2 N/A avgt 15 100.252 ± 4.378 ns/op RendezvousBenchmark.synchronous_queue N/A avgt 15 203.933 ± 6.092 ns/op RendezvousBenchmark.synchronous_queue:putToSynchronousQueue N/A avgt 15 203.930 ± 6.091 ns/op RendezvousBenchmark.synchronous_queue:takeFromSynchronousQueue N/A avgt 15 203.935 ± 6.092 ns/op SelectBenchmark.channel N/A avgt 15 220.570 ± 7.919 ns/op SelectBenchmark.channel:receiveFromChannelUsingSelect N/A avgt 15 220.570 ± 7.918 ns/op SelectBenchmark.channel:sendToChannel N/A avgt 15 220.570 ± 7.919 ns/op SelectBenchmark.single_channel_iterative N/A avgt 15 227.974 ± 26.769 ns/op SelectBenchmark.two_channels_iterative N/A avgt 15 259.144 ± 56.675 ns/op Kotlin: (capacity) Mode Cnt Score Error Units BufferedKotlinBenchmark.sendReceiveUsingDefaultDispatcher 1 avgt 15 111.603 ± 3.872 ns/op BufferedKotlinBenchmark.sendReceiveUsingDefaultDispatcher 10 avgt 15 51.874 ± 0.626 ns/op BufferedKotlinBenchmark.sendReceiveUsingDefaultDispatcher 100 avgt 15 32.190 ± 0.314 ns/op RendezvousKotlinBenchmark.sendReceiveUsingDefaultDispatcher N/A avgt 15 142.137 ± 2.945 ns/op SelectKotlinBenchmark.sendReceiveUsingSelect_singleChannel_defaultDispatcher N/A avgt 15 258.970 ± 7.418 ns/op SelectKotlinBenchmark.sendReceiveUsingSelect_twoChannels_defaultDispatcher N/A avgt 15 349.801 ± 25.130 ns/op ```
github-actions[bot] commented 10 months ago
Benchmark results ``` Java: (capacity) Mode Cnt Score Error Units BufferedBenchmark.array_blocking_queue 1 avgt 15 1200.048 ± 115.343 ns/op BufferedBenchmark.array_blocking_queue:putToArrayBlockingQueue 1 avgt 15 1200.049 ± 115.350 ns/op BufferedBenchmark.array_blocking_queue:takeFromArrayBlockingQueue 1 avgt 15 1200.047 ± 115.337 ns/op BufferedBenchmark.array_blocking_queue 10 avgt 15 243.868 ± 23.697 ns/op BufferedBenchmark.array_blocking_queue:putToArrayBlockingQueue 10 avgt 15 243.867 ± 23.696 ns/op BufferedBenchmark.array_blocking_queue:takeFromArrayBlockingQueue 10 avgt 15 243.869 ± 23.698 ns/op BufferedBenchmark.array_blocking_queue 100 avgt 15 153.484 ± 15.965 ns/op BufferedBenchmark.array_blocking_queue:putToArrayBlockingQueue 100 avgt 15 153.484 ± 15.965 ns/op BufferedBenchmark.array_blocking_queue:takeFromArrayBlockingQueue 100 avgt 15 153.484 ± 15.965 ns/op BufferedBenchmark.channel 1 avgt 15 220.145 ± 8.542 ns/op BufferedBenchmark.channel:receiveFromChannel 1 avgt 15 220.145 ± 8.544 ns/op BufferedBenchmark.channel:sendToChannel 1 avgt 15 220.146 ± 8.540 ns/op BufferedBenchmark.channel 10 avgt 15 178.103 ± 6.370 ns/op BufferedBenchmark.channel:receiveFromChannel 10 avgt 15 178.103 ± 6.369 ns/op BufferedBenchmark.channel:sendToChannel 10 avgt 15 178.102 ± 6.370 ns/op BufferedBenchmark.channel 100 avgt 15 148.973 ± 11.755 ns/op BufferedBenchmark.channel:receiveFromChannel 100 avgt 15 148.974 ± 11.751 ns/op BufferedBenchmark.channel:sendToChannel 100 avgt 15 148.972 ± 11.758 ns/op BufferedBenchmark.channel_iterative 1 avgt 15 223.267 ± 17.336 ns/op BufferedBenchmark.channel_iterative 10 avgt 15 171.504 ± 5.007 ns/op BufferedBenchmark.channel_iterative 100 avgt 15 136.710 ± 8.434 ns/op RendezvousBenchmark.channel N/A avgt 15 189.685 ± 10.466 ns/op RendezvousBenchmark.channel:receiveFromChannel N/A avgt 15 189.687 ± 10.465 ns/op RendezvousBenchmark.channel:sendToChannel N/A avgt 15 189.684 ± 10.466 ns/op RendezvousBenchmark.channel_iterative N/A avgt 15 188.094 ± 8.978 ns/op RendezvousBenchmark.exchanger N/A avgt 15 96.670 ± 3.418 ns/op RendezvousBenchmark.exchanger:exchange1 N/A avgt 15 96.670 ± 3.418 ns/op RendezvousBenchmark.exchanger:exchange2 N/A avgt 15 96.671 ± 3.418 ns/op RendezvousBenchmark.synchronous_queue N/A avgt 15 200.813 ± 9.725 ns/op RendezvousBenchmark.synchronous_queue:putToSynchronousQueue N/A avgt 15 200.813 ± 9.725 ns/op RendezvousBenchmark.synchronous_queue:takeFromSynchronousQueue N/A avgt 15 200.812 ± 9.725 ns/op SelectBenchmark.channel N/A avgt 15 300.452 ± 126.736 ns/op SelectBenchmark.channel:receiveFromChannelUsingSelect N/A avgt 15 300.452 ± 126.737 ns/op SelectBenchmark.channel:sendToChannel N/A avgt 15 300.452 ± 126.734 ns/op SelectBenchmark.single_channel_iterative N/A avgt 15 221.770 ± 8.607 ns/op SelectBenchmark.two_channels_iterative N/A avgt 15 267.204 ± 50.969 ns/op Kotlin: (capacity) Mode Cnt Score Error Units BufferedKotlinBenchmark.sendReceiveUsingDefaultDispatcher 1 avgt 15 158.301 ± 93.684 ns/op BufferedKotlinBenchmark.sendReceiveUsingDefaultDispatcher 10 avgt 15 51.362 ± 1.149 ns/op BufferedKotlinBenchmark.sendReceiveUsingDefaultDispatcher 100 avgt 15 33.131 ± 1.206 ns/op RendezvousKotlinBenchmark.sendReceiveUsingDefaultDispatcher N/A avgt 15 144.697 ± 4.197 ns/op SelectKotlinBenchmark.sendReceiveUsingSelect_singleChannel_defaultDispatcher N/A avgt 15 255.074 ± 12.411 ns/op SelectKotlinBenchmark.sendReceiveUsingSelect_twoChannels_defaultDispatcher N/A avgt 15 330.132 ± 18.180 ns/op ```