kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #28143
Re: Strange COLOR4D::LegacyMix( COLOR4D aColor ) optimization
By the way, thanks for fixing issue with EDA_COLOR_T constructor, I had
that fixed locally but for some reason it did not make it in to my patch.
Sorry about that. I will have some more time tonight to look at other
color issues if you run in to them. If not, I will keep working on
GerbView.
Best,
Jon
On Thu, Feb 23, 2017 at 10:47 AM, Jon Evans <jon@xxxxxxxxxxxxx> wrote:
> Hi JP,
>
> You could well be right, I did not perform cycle counting on this method,
> just kept the map lookup because that is what was used before. It would be
> a better optimization (if one if even needed) to come up with a fast way of
> hashing a COLOR4D so that it can be used as a key in a key-value store.
> Please feel free to change how this works, I am not attached to it.
>
> Best,
> Jon
>
> On Thu, Feb 23, 2017 at 10:24 AM, jp charras <jp.charras@xxxxxxxxxx>
> wrote:
>
>> Hi Jon,
>>
>> When searching a fix to an issue in legacy mode (incorrect calculation of
>> ORed wxColors), I had a
>> look at
>> COLOR4D::LegacyMix( COLOR4D aColor )
>>
>> and for me the optimization to calculate the mix between 2 wxColors need
>> more calculation than the
>> basic calculation.
>> optimization: normalize and convert 8 double to int, search in map and
>> normalize 4 int to double
>> direct calculation (faster):
>> normalize and convert 6 double to int, and normalize 3 int to double.
>>
>> Am I missed something?
>>
>> Thanks.
>>
>> --
>> Jean-Pierre CHARRAS
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~kicad-developers
>> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~kicad-developers
>> More help : https://help.launchpad.net/ListHelp
>>
>
>
Follow ups
References