You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "gabriele renzi (JIRA)" <ji...@apache.org> on 2010/02/06 10:14:27 UTC
[jira] Created: (CASSANDRA-773) Use Map.entrySet and Map.values
instead of multiple lookups from Map.keySet
Use Map.entrySet and Map.values instead of multiple lookups from Map.keySet
---------------------------------------------------------------------------
Key: CASSANDRA-773
URL: https://issues.apache.org/jira/browse/CASSANDRA-773
Project: Cassandra
Issue Type: Improvement
Affects Versions: 0.5
Reporter: gabriele renzi
Priority: Trivial
Fix For: 0.6
in a few places in the codebase there are loops on Map containers in which the values are read but the iteration is done on the keys with subsequent calls to map.get(key).
Using entrySet/values instead of keySet should bear a little performance improvement in that kind of loops (10/30%, if I recall correctly) but mostly the patch just gets rid of a few more FindBugs warnings. All tests still passing
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (CASSANDRA-773) Use Map.entrySet and Map.values
instead of multiple lookups from Map.keySet
Posted by "gabriele renzi (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-773?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
gabriele renzi updated CASSANDRA-773:
-------------------------------------
Attachment: CASSANDRA-773-nows.patch
CASSANDRA-773.patch
while trying to respect the cassandra code style I think I accidentally fixed some other tabs converting them to whitespaces. the -nows patch was generated ignoring whitespace changes.
> Use Map.entrySet and Map.values instead of multiple lookups from Map.keySet
> ---------------------------------------------------------------------------
>
> Key: CASSANDRA-773
> URL: https://issues.apache.org/jira/browse/CASSANDRA-773
> Project: Cassandra
> Issue Type: Improvement
> Affects Versions: 0.5
> Reporter: gabriele renzi
> Priority: Trivial
> Fix For: 0.6
>
> Attachments: CASSANDRA-773-nows.patch, CASSANDRA-773.patch
>
> Original Estimate: 0.17h
> Remaining Estimate: 0.17h
>
> in a few places in the codebase there are loops on Map containers in which the values are read but the iteration is done on the keys with subsequent calls to map.get(key).
> Using entrySet/values instead of keySet should bear a little performance improvement in that kind of loops (10/30%, if I recall correctly) but mostly the patch just gets rid of a few more FindBugs warnings. All tests still passing
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CASSANDRA-773) Use Map.entrySet and Map.values
instead of multiple lookups from Map.keySet
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CASSANDRA-773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12834867#action_12834867 ]
Hudson commented on CASSANDRA-773:
----------------------------------
Integrated in Cassandra #357 (See [http://hudson.zones.apache.org/hudson/job/Cassandra/357/])
> Use Map.entrySet and Map.values instead of multiple lookups from Map.keySet
> ---------------------------------------------------------------------------
>
> Key: CASSANDRA-773
> URL: https://issues.apache.org/jira/browse/CASSANDRA-773
> Project: Cassandra
> Issue Type: Improvement
> Affects Versions: 0.5
> Reporter: gabriele renzi
> Assignee: gabriele renzi
> Priority: Trivial
> Fix For: 0.6
>
> Attachments: CASSANDRA-773-nows.patch, CASSANDRA-773.patch
>
> Original Estimate: 0.17h
> Remaining Estimate: 0.17h
>
> in a few places in the codebase there are loops on Map containers in which the values are read but the iteration is done on the keys with subsequent calls to map.get(key).
> Using entrySet/values instead of keySet should bear a little performance improvement in that kind of loops (10/30%, if I recall correctly) but mostly the patch just gets rid of a few more FindBugs warnings. All tests still passing
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.