You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "dk2k (via GitHub)" <gi...@apache.org> on 2023/04/06 12:14:14 UTC

[GitHub] [camel] dk2k opened a new pull request, #9825: fixed results of inspection "Single char arg in startsWith() and endsWith() can be substituted with charAt()"

dk2k opened a new pull request, #9825:
URL: https://github.com/apache/camel/pull/9825

   fixed results of inspection "Single char arg in startsWith() and endsWith() can be substituted with charAt()". charAt() is more efficient
   Added two helper methods into StringHelper in camel-util


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] orpiske closed pull request #9825: fixed results of inspection "Single char arg in startsWith() and endsWith() can be substituted with charAt()"

Posted by "orpiske (via GitHub)" <gi...@apache.org>.
orpiske closed pull request #9825: fixed results of inspection "Single char arg in startsWith() and endsWith() can be substituted with charAt()"
URL: https://github.com/apache/camel/pull/9825


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] davsclaus commented on pull request #9825: fixed results of inspection "Single char arg in startsWith() and endsWith() can be substituted with charAt()"

Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on PR #9825:
URL: https://github.com/apache/camel/pull/9825#issuecomment-1499093611

   Does the JDK not itself optimize for such use-cases, as its common to check starts with a single char.


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] orpiske commented on pull request #9825: fixed results of inspection "Single char arg in startsWith() and endsWith() can be substituted with charAt()"

Posted by "orpiske (via GitHub)" <gi...@apache.org>.
orpiske commented on PR #9825:
URL: https://github.com/apache/camel/pull/9825#issuecomment-1501760243

   I think we can close this, as there isn't really a performance problem.


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] github-actions[bot] commented on pull request #9825: fixed results of inspection "Single char arg in startsWith() and endsWith() can be substituted with charAt()"

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #9825:
URL: https://github.com/apache/camel/pull/9825#issuecomment-1499066786

   :leftwards_arrow_with_hook: There are either **too many** changes to be tested in this PR or the code **needs be rebased**: (45 components likely to be affected)


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] orpiske commented on pull request #9825: fixed results of inspection "Single char arg in startsWith() and endsWith() can be substituted with charAt()"

Posted by "orpiske (via GitHub)" <gi...@apache.org>.
orpiske commented on PR #9825:
URL: https://github.com/apache/camel/pull/9825#issuecomment-1500859414

   > Does the JDK not itself optimize for such use-cases, as its common to check starts with a single char.
   
   It probably does. AFAIK, there's a lot that could be in play here: from the JVM/compiler optimizing this, auto-vectorization, to how each platform handle the specific behaviors of the low-level operations that perform this change ... I'd probably leave this one as is. 


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] github-actions[bot] commented on pull request #9825: fixed results of inspection "Single char arg in startsWith() and endsWith() can be substituted with charAt()"

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #9825:
URL: https://github.com/apache/camel/pull/9825#issuecomment-1498966224

   :star2: Thank you for your contribution to the Apache Camel project! :star2: 
   
   :warning: Please note that the changes on this PR may be **tested automatically**. 
   
   If necessary Apache Camel Committers may access logs and test results in the job summaries!


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [camel] dk2k commented on pull request #9825: fixed results of inspection "Single char arg in startsWith() and endsWith() can be substituted with charAt()"

Posted by "dk2k (via GitHub)" <gi...@apache.org>.
dk2k commented on PR #9825:
URL: https://github.com/apache/camel/pull/9825#issuecomment-1501098215

   @orpiske I will provide it even if it's not in favour of the suggested code cganges ;)
   https://gist.github.com/dk2k/5204c1a07d949647e277b7ceb03c266e
   In the most cases native String startsWith() and endsWith() are faster
   time for String.startsWith       49
   time for StringHelper.startsWith 74
   You can try it yourself.
   So we should discard this PR, I believe. 


-- 
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: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org