netudima commented on PR #4536:
URL: https://github.com/apache/cassandra/pull/4536#issuecomment-3760320392
I've done a retesting for the current version
```
if (cell.getClass() == NativeCell.class)
{
valueSize = cell.valueSize();
hasValue = valueSize > 0;
isDeleted = cell.isTombstone();
isExpiring = cell.isExpiring();
cellTimestamp = cell.timestamp();
localDeletionTime = cell.localDeletionTime();
ttl = cell.ttl();
value = cell.value();
accessor = cell.accessor();
}
else
{
valueSize = cell.valueSize();
hasValue = valueSize > 0;
isDeleted = cell.isTombstone();
isExpiring = cell.isExpiring();
cellTimestamp = cell.timestamp();
localDeletionTime = cell.localDeletionTime();
ttl = cell.ttl();
value = cell.value();
accessor = cell.accessor();
}
```
is not equivalent to
```
if (cell.getClass() == ArrayCell.class)
{
valueSize = cell.valueSize();
hasValue = valueSize > 0;
isDeleted = cell.isTombstone();
isExpiring = cell.isExpiring();
cellTimestamp = cell.timestamp();
localDeletionTime = cell.localDeletionTime();
ttl = cell.ttl();
value = cell.value();
accessor = cell.accessor();
}
else
{
valueSize = cell.valueSize();
hasValue = valueSize > 0;
isDeleted = cell.isTombstone();
isExpiring = cell.isExpiring();
cellTimestamp = cell.timestamp();
localDeletionTime = cell.localDeletionTime();
ttl = cell.ttl();
value = cell.value();
accessor = cell.accessor();
}
```
while direct calls like cell.timestamp() as expected are inlined in both
cases
<img width="1124" height="121" alt="image"
src="https://github.com/user-attachments/assets/2260fbd5-b824-4bb5-b516-180df16f92f0"
/>
there is a difference in inlining for 2nd level in cases like
cell.localDeletionTime(); -> cell.localDeletionTimeAsUnsignedInt(), it looks
like inlining does not work on the 2nd level for bimorphic calls:
<img width="1534" height="90" alt="image"
src="https://github.com/user-attachments/assets/28b5c330-92e1-48f8-a6bb-4d2729d5c274"
/>
I'll try and compare possible options, such as two if blocks if
(cell.getClass() == ArrayCell.class) + if (cell.getClass() ==
NativeCell.class) and switch to it if it shows better results.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]