[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] [qemu-img] CPU consuming optimization
From: |
Dmitry Konishchev |
Subject: |
Re: [Qemu-devel] [PATCH] [qemu-img] CPU consuming optimization |
Date: |
Wed, 18 May 2011 14:27:29 +0400 |
On Wed, May 18, 2011 at 1:40 PM, Peter Maydell <address@hidden> wrote:
> You could assert() this:
> assert(argc % (4 * sizeof(long)) == 0);
Yeah, but actually I'm not really like the idea to include asserts in
the little bottleneck functions if the configuration script doesn't
include -DNDEBUG in the compiler cflags by default. Because in this
case it's yet additional instructions on which CPU pipeline is going
to stumble upon + it also decreases the chances for this function to
be inlined by the compiler. But inlining can give us an additional
boost + compiler will be able to understand that, in the place where
the function is inlined, it is always called with len == 512 and
optimize the code for this case by automatically unroll the loop and
so on.
But in the bottom line I don't really mind to include the assert -
just believe that it's not really worth it.
--
Dmitry Konishchev
mailto:address@hidden
- Re: [Qemu-devel] [PATCH] [qemu-img] CPU consuming optimization, (continued)
- Re: [Qemu-devel] [PATCH] [qemu-img] CPU consuming optimization, Dmitry Konishchev, 2011/05/18
- Re: [Qemu-devel] [PATCH] [qemu-img] CPU consuming optimization, Stefan Hajnoczi, 2011/05/18
- Re: [Qemu-devel] [PATCH] [qemu-img] CPU consuming optimization, Kevin Wolf, 2011/05/18
- Re: [Qemu-devel] [PATCH] [qemu-img] CPU consuming optimization, Dmitry Konishchev, 2011/05/18
- Re: [Qemu-devel] [PATCH] [qemu-img] CPU consuming optimization, Kevin Wolf, 2011/05/18
- Re: [Qemu-devel] [PATCH] [qemu-img] CPU consuming optimization, Dmitry Konishchev, 2011/05/18
- [Qemu-devel] [PATCH] is_not_zero() optimization in qemu-img, Dmitry Konishchev, 2011/05/18
- Re: [Qemu-devel] [PATCH] is_not_zero() optimization in qemu-img, Kevin Wolf, 2011/05/18
- Re: [Qemu-devel] [PATCH] [qemu-img] CPU consuming optimization, Peter Maydell, 2011/05/18
- Re: [Qemu-devel] [PATCH] [qemu-img] CPU consuming optimization, Peter Maydell, 2011/05/18
- Re: [Qemu-devel] [PATCH] [qemu-img] CPU consuming optimization,
Dmitry Konishchev <=