kzhunmax opened a new pull request, #1754:
URL: https://github.com/apache/commons-lang/pull/1754

   ## Summary
   
   Replace the repeated use of String.matches() in ClassUtils.toCleanName()
   with a precompiled static Pattern.
   
   ### Motivation
   
   String.matches() recompiles the regular expression on every invocation.
   Reusing a compiled Pattern avoids this overhead while preserving the
   existing behavior.
   
   A local JMH benchmark showed approximately 4x-9x higher throughput for
   the validation step after this change.
   
   Related: LANG-1830


-- 
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]

Reply via email to