Re: [Qemu-devel] [PATCH] vga: optimize ppm_save() divisions

2012-01-12 Thread Anthony Liguori
On 01/03/2012 07:32 AM, Avi Kivity wrote: ppm_save() spends upwards of 50% of its time doing divisions. Replace them with shifts. Signed-off-by: Avi Kivity Applied. Thanks. Regards, Anthony Liguori --- hw/vga.c | 10 -- 1 files changed, 4 insertions(+), 6 deletions(-) diff -

Re: [Qemu-devel] [PATCH] vga: optimize ppm_save() divisions

2012-01-12 Thread Alon Levy
On Thu, Jan 12, 2012 at 05:16:03PM +0200, Alon Levy wrote: > On Tue, Jan 03, 2012 at 03:32:57PM +0200, Avi Kivity wrote: > > ppm_save() spends upwards of 50% of its time doing divisions. Replace them > > with shifts. > > > > Reviewed-by: Alon Levy > > rmax/bmax/gmax are all uint8_t atm, could a

Re: [Qemu-devel] [PATCH] vga: optimize ppm_save() divisions

2012-01-12 Thread Alon Levy
On Tue, Jan 03, 2012 at 03:32:57PM +0200, Avi Kivity wrote: > ppm_save() spends upwards of 50% of its time doing divisions. Replace them > with shifts. > Reviewed-by: Alon Levy rmax/bmax/gmax are all uint8_t atm, could add a compilation error if sizeof(bmax)!=1 ever. > Signed-off-by: Avi Kivit

Re: [Qemu-devel] [PATCH] vga: optimize ppm_save() divisions

2012-01-12 Thread Avi Kivity
On 01/03/2012 03:32 PM, Avi Kivity wrote: > ppm_save() spends upwards of 50% of its time doing divisions. Replace them > with shifts. > > Pings. -- error compiling committee.c: too many arguments to function

[Qemu-devel] [PATCH] vga: optimize ppm_save() divisions

2012-01-03 Thread Avi Kivity
ppm_save() spends upwards of 50% of its time doing divisions. Replace them with shifts. Signed-off-by: Avi Kivity --- hw/vga.c | 10 -- 1 files changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/vga.c b/hw/vga.c index ca79aa1..a228cde 100644 --- a/hw/vga.c +++ b/hw/vga.c @@ -237