[PULL weston] simple fixes

yan.wang at linux.intel.com yan.wang at linux.intel.com
Thu Apr 26 23:09:38 PDT 2012


> On Thu, 26 Apr 2012 19:42:52 -0700 (PDT)
> yan.wang at linux.intel.com wrote:
>
>> > http://cgit.collabora.com/git/user/pq/wayland-demos.git/log/?h=simple-fixes
> ...
>> About "simple-shm: render meaningful diagnostics", Because paint_pixels
>> process pixels one by one, the following may be better:
>> time/32 -> time>>5
>> time/64 -> time>>6
>> time/16 -> time>>4
>
> You're saying the compiler does not automatically do that? Dang.
> I thought it would if given the chance by using nice constant divisors.
>
> Right, I didn't pay too much attention to performance, it is a debug
> app after all. Can be optimised if someone has trouble with it.
>
>
> Thanks,
> pq
>
Yes. Current popular compilers may do this optimization. But ">>" may be
better. Just suggestion.

Thanks.
Yan Wang


More information about the wayland-devel mailing list