You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Nitsan Wakart (JIRA)" <ji...@apache.org> on 2016/03/24 10:50:25 UTC
[jira] [Created] (CASSANDRA-11423) Eliminate Pair allocations for
default DataType conversions
Nitsan Wakart created CASSANDRA-11423:
-----------------------------------------
Summary: 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)