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

Dawid Weiss commented on LUCENE-9404:
-------------------------------------

I remember clearly this had to do with update(ByteBuffer) version being slower 
in performance tests... but I look at the sources of OpenJDK now and see it's 
implemented in pretty much the same way [1] since Java 9 (me looking completely 
puzzled). The choice of built-in Checksum class was arbitrary (felt like the 
simplest choice without bringing in other dependencies or copying code).

Please feel free to commit it in, strange.

[1] 
https://docs.oracle.com/javase/9/docs/api/java/util/zip/Checksum.html#update-java.nio.ByteBuffer-

> simplify checksum calculation of ByteBuffersIndexOutput
> -------------------------------------------------------
>
>                 Key: LUCENE-9404
>                 URL: https://issues.apache.org/jira/browse/LUCENE-9404
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Robert Muir
>            Priority: Major
>         Attachments: LUCENE-9404.patch
>
>
> I think this class can avoid its current logic/copying and just call 
> CRC32.update(ByteBuffer) which is optimized for both array and direct buffers?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to