-
Notifications
You must be signed in to change notification settings - Fork 16
micro-optimizations #186
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
micro-optimizations #186
Conversation
1) delete redundant field isUnlimited (-1 byte; simpler if) 2) integer division
|
PS: some ifs can be replaced with switch: It could be faster 🤷♀️ to |
|
I have a litte bit more intrusive https://github.com/magicprinc/jox/commits/feature/more-optimizations/
I can push it here if you like |
|
ArrayBlockingQueue -vs- Channel.newBufferedChannel(1000) newUnlimitedChannel + https://github.com/magicprinc/jox/commits/feature/more-optimizations/ BUT .size() is required, to protect from queue blowing up and OOM |
|
I'm afraid we cannot change The other changes look good :) We could also do |
Pure abstract beauty Rolled back ✅ |
|
done ✅ —— I can push commits into separate PRs… |
|
Thank you :) |
|
Thank You for such amazing project! I really think it deserves the honor of joining the JDK. As for communications (openness, friendliness): You are the Nr.1 open source project author, that I have ever met 🤝💖 |
Well remember that it's just implementing an algorithm described and used in Kotlin :)
😅 now I have to try and keep up ;) |
ChannelClosedException isn't created directly and only used as a parent, so it should be an abstract class 🙏
Channel.isUnlimited is redundant: extra byte and extra if condition
Replace Math.ceil with faster integer division