[
https://issues.apache.org/jira/browse/ARTEMIS-3063?focusedWorklogId=534835&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-534835
]
ASF GitHub Bot logged work on ARTEMIS-3063:
-------------------------------------------
Author: ASF GitHub Bot
Created on: 12/Jan/21 13:29
Start Date: 12/Jan/21 13:29
Worklog Time Spent: 10m
Work Description: franz1981 commented on pull request #3405:
URL: https://github.com/apache/activemq-artemis/pull/3405#issuecomment-758654800
This one is an easy one: using `switch` enable a nice `String` optimization
allowing `javac` to use a `lookupswitch` that has a log(n) cost (with base 2)
to lookup at the correct hash code (and I've verified that the hashcode of the
cases in the switch have no collisions) + O(n) - n the smaller string to
compare to check the specific string equality.
Now the thing is: the binary search used by `lookupswitch` is fast enough?
I would say yes, but probably only a JMH bench can help here.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 534835)
Time Spent: 20m (was: 10m)
> AMQPMessage get property can use a String switch
> ------------------------------------------------
>
> Key: ARTEMIS-3063
> URL: https://issues.apache.org/jira/browse/ARTEMIS-3063
> Project: ActiveMQ Artemis
> Issue Type: Improvement
> Reporter: Francesco Nigro
> Assignee: Francesco Nigro
> Priority: Minor
> Time Spent: 20m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)