You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Francisco Guerrero (Jira)" <ji...@apache.org> on 2026/07/27 18:43:00 UTC

[jira] [Commented] (CASSANDRA-21526) Avoid megamorpthic calls for Cell.timestamp/ttl/path/localDeletionTimeAsUnsignedInt methods

    [ https://issues.apache.org/jira/browse/CASSANDRA-21526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18099537#comment-18099537 ] 

Francisco Guerrero commented on CASSANDRA-21526:
------------------------------------------------

+1 thanks for the patch

> Avoid megamorpthic calls for Cell.timestamp/ttl/path/localDeletionTimeAsUnsignedInt methods
> -------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-21526
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-21526
>             Project: Apache Cassandra
>          Issue Type: Improvement
>          Components: Local/Other
>            Reporter: Dmitry Konstantinov
>            Assignee: Dmitry Konstantinov
>            Priority: Normal
>             Fix For: 6.x, 7.x
>
>         Attachments: example.png
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Currently we have 3 main implementations for Cell:
> * ArrayCell
> * BufferCell 
> * NativeCell
> in some cases all of them can be used together in the same call sites causing a virtual dispatch and inability to inline.
> For property getter methods: timestamp/ttl/path/localDeletionTimeAsUnsignedInt we can avoid it by introducing a common parent class for ArrayCell and BufferCell and moving common fields there. It will reduce using implementations of the correspondent getters to 2 (or 1 if non offheap_objects mode is used), so we will have monomorphic (ideal for performance) or bimorphic calls of the methods which JIT can optimize/inline.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org