[ 
https://issues.apache.org/jira/browse/KAFKA-3174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15127127#comment-15127127
 ] 

Ismael Juma commented on KAFKA-3174:
------------------------------------

Unfortunately, the micro-benchmark above is not reliable. That's why I used JMH 
(which is maintained by the Oracle JVM team for their own Java benchmarks) for 
my benchmarks. See 
https://groups.google.com/d/msg/mechanical-sympathy/m4opvy4xq3U/7lY8x8SvHgwJ 
for why you should use JMH for nano and micro-benchmarks.

The Intel CRC32 instruction is for CRC32C, which uses a different polynomial 
than the one we use for Kafka (again, see KAFKA-1449 for more details on this). 
I actually checked the HotSpot code 
(http://hg.openjdk.java.net/hsx/hsx25/hotspot/rev/b800986664f4) and the 
assembly generated by the HotSpot JIT to verify my assertion before I posted my 
previous comment with regards to SSE 2, SSE 4.1, AVX and CLMUL being used.

> Re-evaluate the CRC32 class performance.
> ----------------------------------------
>
>                 Key: KAFKA-3174
>                 URL: https://issues.apache.org/jira/browse/KAFKA-3174
>             Project: Kafka
>          Issue Type: Improvement
>    Affects Versions: 0.9.0.0
>            Reporter: Jiangjie Qin
>            Assignee: Jiangjie Qin
>             Fix For: 0.9.0.1
>
>
> We used org.apache.kafka.common.utils.CRC32 in clients because it has better 
> performance than java.util.zip.CRC32 in Java 1.6.
> In a recent test I ran it looks in Java 1.8 the CRC32 class is 2x as fast as 
> the Crc32 class we are using now. We may want to re-evaluate the performance 
> of Crc32 class and see it makes sense to simply use java CRC32 instead.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to