garydgregory commented on PR #1623:
URL: https://github.com/apache/commons-lang/pull/1623#issuecomment-4263076906

   Hello @FloydDsilva 
   
   The main issue, I think, is having two methods with distinct, complex custom 
parsing code that attempts (and has obviously failed) to match not only what 
the JRE number classes allow but also our own rules. In addition, we want the 
methods to be consistent with each other, if the "is" method returns true, then 
the "create" method should always work, and vice versa.
   
   Unless it is measured (say with a JMH benchmark), we'll never know. 
Unfortunately, even with a benchmark, there are many "it depends". For example, 
classes like Integer, Short, Long, Byte, and Character, but not Float and 
Double, have their own cache to reduce object creation. Another is that the 
parsing code is going to favor, intentionally or not, one type over another. 
Parsing in the "is" method wasn't allocation free either.
   
   HTH


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