cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua McKenzie (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-11423) Eliminate Pair allocations for default DataType conversions
Date Thu, 24 Mar 2016 15:15:25 GMT

     [ 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)

Mime
View raw message