You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Joshua McKenzie (JIRA)" <ji...@apache.org> on 2016/03/24 16:15:25 UTC

[jira] [Updated] (CASSANDRA-11423) Eliminate Pair allocations for default DataType conversions

     [ https://issues.apache.org/jira/browse/CASSANDRA-11423?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Joshua McKenzie updated CASSANDRA-11423:
----------------------------------------
    Reviewer: T Jake Luciani

> Eliminate Pair allocations for default DataType conversions
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-11423
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11423
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Nitsan Wakart
>
> The method DataType::fromType returns a Pair. The common path through the method is:
> {
>    DataType dt = dataTypeMap.get(type);
>    return new Pair(dt, null);
> }
> This results in many redundant allocation and is easy to fix by adding a DataType field to cache this result per DataType and replacing the last line with:
>   return dt.pair;
> see fix:
> https://github.com/nitsanw/cassandra/tree/data-type-dafault-pair



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)