cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Ellis (Commented) (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-3938) Optimize autoboxing in ReplayPosition.comparator
Date Tue, 21 Feb 2012 23:24:48 GMT


Jonathan Ellis commented on CASSANDRA-3938:

Is this really a performance pain point?  Doing a couple box/unboxes per sstable on CL replay
doesn't seem like a hot spot to me.  Unless performance is a problem I think the meaning of
the code is more clear as it is now.
> Optimize autoboxing in ReplayPosition.comparator
> ------------------------------------------------
>                 Key: CASSANDRA-3938
>                 URL:
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 1.0.7, 1.1.0
>            Reporter: Jason Brown
>            Priority: Trivial
>              Labels: commitlog, replay
>             Fix For: 1.1.1
>         Attachments: 0001.ReplayPosition-autobox.patch
> ReplayPosition.comparator does some unnecessary boxing (and auto-boxing) from primitive
int and long to Integer and Long, just to perform a basic numeric comparison. We can just
inline the comparison and avoid the conversion to Integer/Long instances. The ReplayPosition.equals()
simple looks at the primitive values, so this change would just make the code more parallel.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message