[
https://issues.apache.org/jira/browse/CASSANDRA-1043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12863425#action_12863425
]
James Golick commented on CASSANDRA-1043:
-----------------------------------------
Okay, here is a revised version of the patch. I removed the subtraction of the
gregorian epoch offset division to change the units and added some unit tests...
The tests aren't really that great and they require the addition of the uuid
jar referenced in the FAQ. I'd love to hear some more ideas on how to make them
better.
> Faster UUID comparisons
> -----------------------
>
> Key: CASSANDRA-1043
> URL: https://issues.apache.org/jira/browse/CASSANDRA-1043
> Project: Cassandra
> Issue Type: Improvement
> Components: Core
> Reporter: James Golick
> Priority: Minor
> Attachments: faster_uuid_compare.diff
>
>
> As I explained on the mailing list, doing slice queries on CFs that are
> sorted by TimeUUIDType gets slower as the value of count increases. According
> to my profiles, this is largely due to the fact that ConcurrentSkipListMap
> calls the comparator very frequently, which is extremely inefficient. In
> order to compare two UUIDs, it has to materialize them both in to
> java.util.UUID objects which is quite slow. The more UUIDs to compare, the
> slower it is.
> Attached is a patch that compares UUIDs by extracting the timestamp directly
> from the byte[] representation. According to my tests, it's close to a 50%
> performance improvement.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.