SethFalco commented on PR #49: URL: https://github.com/apache/commons-beanutils/pull/49#issuecomment-3129975017
@garydgregory Rebased! I've also made the following changes: * I've removed the `public` keyword from test classes and test functions I'd added, based on https://github.com/apache/commons-beanutils/commit/c00f87291b763283cd462a1a3ab5e562f5a3c39f and https://github.com/apache/commons-beanutils/commit/f89bdd34c43ae18f0e34189b08aa447afc9044c7. * I replaced the regular expression in `EnumConverter` with String parsing. Back when I originally wrote this, I was overzealous about regular expression, and used it as my default choice of tool. However, I've since become more conscious of performance and appreciate a few extra lines of String parsing is often better than pattern matching, plus many don't consider them maintainable. > ``` > Benchmark Mode Cnt Score Error Units > EnumStringToConstBenchmark.stringParsing avgt 7122.947 ns/op > EnumStringToConstBenchmark.usingRegex avgt 9006.940 ns/op > ``` > > — [SethFalco/java-microbenchmarks#!4](https://gitlab.com/SethFalco/java-microbenchmarks/-/merge_requests/4) _(lower is better)_ The change in implementation shouldn't affect the behavior. All test cases have identical results to before, and in my benchmark I checked a few more cases too. Let me know if you'd like me to reverse that change or have other feedback! -- 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]
