cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Ellis (JIRA)" <>
Subject [jira] Commented: (CASSANDRA-275) Replace Map.keySet by more efficient Map.entrySet
Date Tue, 07 Jul 2009 15:05:14 GMT


Jonathan Ellis commented on CASSANDRA-275:

Minor problem: this patch does not follow Cassandra code conventions

Bigger problem: using entrySet is uglier than iterating keys and calling get in many situations.
 I'm -1 on doing a blanket replace in the name of efficiency.

> Replace Map.keySet by more efficient Map.entrySet
> -------------------------------------------------
>                 Key: CASSANDRA-275
>                 URL:
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Edward Ribeiro
>            Priority: Minor
>         Attachments: CASSANDRA-275.patch
> When you iterates over all key-values of a Map is better to use entrySet() instead of
a call to entryKey() and a call to get() inside the loop. It's more efficient. 
> I've seen a patch like this before, but I don't think it was applied at all. 

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message