-
Notifications
You must be signed in to change notification settings - Fork 47
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
Improve type stability in conversion methods #427
Conversation
fy = (c.l + 16) / 116 | ||
fx = c.a / 500 + fy | ||
fx = fy + c.a / 500 | ||
fz = fy - c.b / 200 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we change these divisions into reciprocal multiplications, this method can be inlined, i.e. successfully vectorized. However, even if only Lab
-->XYZ
conversion is speeded up, Lab
-->RGB
conversion is not speeded up.
Codecov Report
@@ Coverage Diff @@
## master #427 +/- ##
==========================================
- Coverage 91.21% 91.08% -0.13%
==========================================
Files 9 9
Lines 956 965 +9
==========================================
+ Hits 872 879 +7
- Misses 84 86 +2
Continue to review full report at Codecov.
|
find_maximum_chroma
I separated part of this PR to #442. |
518d4ea
to
5f23315
Compare
This also optimizes conversion methods and changes the results slightly.
Now that we have added the support for ColorTypes v0.11, we will start developing Colors v0.13 series. This means that breaking changes can be merged. Also, Colors v0.13.0 is scheduled to be released at the same time as ColorTypes v0.12.0, so there will be some time before the release. In other words, even if bugs are introduced, that is not a problem as long as they are fixed before the release. |
This also optimizes conversion methods and changes the results slightly.
This also optimizes conversion methods and changes the results slightly.
I found some type instability issues while tackling JuliaLang/julia#35972 or #425. Unfortunately, this doesn't solve JuliaLang/julia#35972, and doesn't provide much performance improvement.
This is a successor of PR #424.(Merged. However, I'm still looking for a way to solve #425.)This should be the next v0.13 material since this changes the conversion results slightly.