Have you ever wondered how to use all of your cores?
The talk will take you on a path of writing a simple concurrent class. We'll start with a basic implementation and gradually improve it based on presented problems and newly learned facts. Our final solution will behave well in the face of concurrency and execute consistently on all Ruby implementations.
We’ll investigate various Ruby runtime differences that we’ve abstracted away with the synchronization layer of the concurrent-ruby gem. We'll go down to JRuby extensions, even volatile fields and compare-and-swap operations.
Benchmark source code and examples can be found in https://github.com/ruby-concurrency/concurrent-ruby/tree/master/benchmarks.
Video can be found here http://confreaks.tv/videos/rubyconf2015-writing-concurrent-libraries-for-all-ruby-runtimes
These slides contain updated JRuby results with enabled invokedynamic, gain was about 40% compared to original numbers which can be seen in the video.