On Fri, Jul 10, 2009 at 11:33:59AM +0100, Bill Crawford wrote: > Peter Hutterer wrote: > >> - nbytesRound = (nbytes + 3) & ~3; >> + nbytesRound = pad_to_dwords(nbytes); > > You're replacing two arithmetic operations with a function call here, > and then ... > >> - rep->length = npixels + (nbytesRound >> 2); >> + rep->length = npixels + num_dwords_for_bytes(nbytesRound); > > Is it really worth replacing a two-bit shift with a function call?
yes, IMO. - functions for common operations reduce the chance of bugs in those operations. - readability. I claim that having a meaningful name for a common operation is easier to read. note that the instances replaced (most of them, anyway) are protocol handling - doubtfully the most performance-critical part. Cheers, Peter _______________________________________________ xorg-devel mailing list [email protected] http://lists.x.org/mailman/listinfo/xorg-devel
