[cairo] Performance difference between rgb and rgba with alpha 1.0 ?
mkbosmans at gmail.com
Wed May 12 12:29:29 PDT 2010
2010/5/12 Stuart Axon <stuaxo2 at yahoo.com>:
> Is it worth me doing this:
> if self._strokecolor == 1:
> or is it a waste of python cycles because set_source_rgba will notice that alpha is set to 1.0
> and run the faster path anyway ?
The only way to know for sure is to benchmark it. Basically anything
else is pure speculation. Remember: premature optimization is the root
of all evil.
Having said that, the result of the benchmarking will probably be that
it does not matter in any measurable way.
More information about the cairo