[concurrency-interest] AtomicReferenceFieldUpdater vs Unsafe

Ismael Juma mlists at juma.me.uk
Thu Nov 17 07:01:39 EST 2011


On Thu, Nov 17, 2011 at 10:53 AM, Roman Elizarov <elizarov at devexperts.com>wrote:

>  The downside is that it fuels the use of sun.misc.Unsafe by 3rd party
> programmer. Every day there are more and more blogs explaining advantages
> of Unsafe to the average programmer.
>

Yes. A common use of Unsafe these days is to improve the performance of
compression algorithms written in pure Java:

https://github.com/dain/snappy/blob/master/src/main/java/org/iq80/snappy/UnsafeMemory.java
https://github.com/ning/compress/blob/master/src/main/java/com/ning/compress/lzf/impl/UnsafeChunkDecoder.java

Off-heap caches too:

https://issues.apache.org/jira/browse/CASSANDRA-3271

It's a shame that this is needed.

Best,
Ismael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cs.oswego.edu/pipermail/concurrency-interest/attachments/20111117/332693a5/attachment.html>


More information about the Concurrency-interest mailing list