[Mono-list] new color.cs for inclusion in CVS

Miguel de Icaza miguel@ximian.com
07 Mar 2002 00:59:21 -0500


> Also, I see your point about local variables being unassigned. So really,
> both cases should be equally optimal. But one's shorter!  :P

My contribution to this discussion is that you should aim for code
clarity, and ease of maintenance.  The easier it is to understand the
code, the more simple the code the better.

Code will live for a very long time, and at this point in time, we do
not even know if these pieces of code are performance critical.  And it
might not even be an issue in the future, as better optimizers are
built.

Profiling in the future will find the real bottle necks, try not to
optimize before you have profiling information at hand, it is typically
just a waste of time.

The unchecked version in the previous post does not really do anything
as shift operations are not checked anyways.   

Miguel.