Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Generally any system which implements this and has serious speed issues isn't going to be doing random colors. It's going to be doing several distinct colors. Even a giant image full of different colors is typically going to only have a few thousand colors. I very highly recommend a caching algorithm. Though if speed is a concern you should roll up your own (you want primitives only, speed).</p> <p>There's not much optimizing to be done with the actual color distance routine itself, but I wrote a caching system for this thing and it went on the order of a 100 times faster. The distance routine went from the overwhelming dominant factor to a blip. You shouldn't seek to reduce the speed of that. You might eek out something. But, reduce the number of times you invoke the thing properly.</p> <p>You have two set inputs and it produces a single set output, and does so after a very very long time. 7 doubles per caching index. That's 14 bytes. For a 14 meg memory footprint (or so, ignoring hashes or what not, likely we're talking double). You can store a million entries and that's enough that if you have like 1k typical different colors you'll get high 90%s cache hits. You can even hugely reduce this if you're converting your initial colors from RGB to Lab (those conversions should be cached too). You'll see a speed up if you hit like 5% of the time. And you'll get hits likely 99% of the time (unless you're doing something odd like random color comparisons). From my observations it makes CIEDE2000 take pretty much the same about of time as Euclidean RGB.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload