[
https://issues.apache.org/jira/browse/CASSANDRA-11423?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jonathan Ellis updated CASSANDRA-11423:
---------------------------------------
Status: Patch Available (was: Open)
> Eliminate Pair allocations for default DataType conversions
> -----------------------------------------------------------
>
> Key: CASSANDRA-11423
> URL: https://issues.apache.org/jira/browse/CASSANDRA-11423
> Project: Cassandra
> Issue Type: Sub-task
> Components: Core
> Reporter: Nitsan Wakart
> Assignee: 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)