ruby-concurrency/concurrent-ruby — pull request #130 by jdantonio (2014-06-29 00:14:21+00:00)
Title: CAtomicBoolean and CAtomicFixnum

This PR revisits earlier experiments with native C extensions in PRs #55, #59, and others. It completely reimplements `CAtomicBoolean` and `CAtomicFixnum` based on the merge of `Atomic` in PR #109. This implementation is much better because it is optimized for multiple operating systems. It also includes much better Yardoc documentation. A few simple benchmarks were run to give an idea of the performance improvements.

Testing with ruby 2.1.2
Testing with Concurrent::MutexAtomicBoolean...
2.790000 0.000000 2.790000 ( 2.791454)
Testing with Concurrent::CAtomicBoolean...
0.740000 0.000000 0.740000 ( 0.740206)

Testing with jruby 1.9.3
Testing with Concurrent::MutexAtomicBoolean...
5.240000 2.520000 7.760000 ( 3.683000)
Testing with Concurrent::JavaAtomicBoolean...
3.340000 0.010000 3.350000 ( 0.855000)

Testing with ruby 2.1.2
Testing with Concurrent::MutexAtomicFixnum...
3.130000 0.000000 3.130000 ( 3.136505)
Testing with Concurrent::CAtomicFixnum...
0.790000 0.000000 0.790000 ( 0.785550)

Testing with jruby 1.9.3
Testing with Concurrent::MutexAtomicFixnum...
5.460000 2.460000 7.920000 ( 3.715000)
Testing with Concurrent::JavaAtomicFixnum...
4.520000 0.030000 4.550000 ( 1.187000)