-
Notifications
You must be signed in to change notification settings - Fork 117
Code cleanup, Patterns instead of operations direct on String #5546
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
enhanced loops, breaks in loops, use primitives, toArray with [0] initializer
good job! the toArray with [0] initializer to me it's not an optimization... If you inspect the code of the Probably at runtime the C2 compiler will optimize that but it requires some work, |
@pizzi80 This change is indeed debatable in terms of its actual benefit. If you prefer, I can revert it. |
Yes!
I suggest to wait the review of @BalusC because I've done a lot of these optimizations in the past In the meantime I've cherry picked some of your changes in my fork |
Thank you, but frankly it's better to break down each different kind of mass-change in a separate PR for a quicker mind processing and easier (isolated) approval/rejection. Right now this is basically a big PR with a lot of unrelated cosmetic changes which do not fix real world problems. On such a big code base it's generally better to rewrite/cleanup/modernize only the part when you actually need to work on that part. |
And indeed, the |
Sorry for the late reply, During this porting I had the chance to improve a lot of other things, @BalusC which could be the best moment to create all those PR?
true but questionable: a lot of these changes are very simple to do with IntelliJ, (some classes are unreadable with a modern IDE, also the programming style |
+1 For me, the most important change was replacing String.replaceAll with precompiled patterns because it was annoying during debugging of my project. The rest of the changes I made along the way. |
@BalusC |
Code cleanup, Patterns instead of operations direct on String
enhanced loops, breaks in loops, use primitives, toArray with [0] initializer