From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50636) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z00KY-0003zM-Q7 for qemu-devel@nongnu.org; Wed, 03 Jun 2015 00:31:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z00KU-0007fU-Lg for qemu-devel@nongnu.org; Wed, 03 Jun 2015 00:31:06 -0400 Received: from mail-pa0-x234.google.com ([2607:f8b0:400e:c03::234]:36169) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z00KU-0007fM-EI for qemu-devel@nongnu.org; Wed, 03 Jun 2015 00:31:02 -0400 Received: by pabqy3 with SMTP id qy3so26902317pab.3 for ; Tue, 02 Jun 2015 21:31:01 -0700 (PDT) Sender: Richard Henderson Message-ID: <556E8300.1010108@twiddle.net> Date: Tue, 02 Jun 2015 21:30:56 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1432214398-14990-1-git-send-email-pbonzini@redhat.com> In-Reply-To: <1432214398-14990-1-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] exec: optimize phys_page_set_level List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , qemu-devel@nongnu.org Cc: stefanha@redhat.com, mst@redhat.com On 05/21/2015 06:19 AM, Paolo Bonzini wrote: > memcpy is faster than struct assignment, which copies each bitfield > individually. Arguably a compiler bug, but memcpy is super-special > cased anyway so what could go wrong? > The compiler has the option of doing the copy either way. Any way to actually show that the small memcpy is faster? That's one of those things where I'm sure there's a cost calculation that said per member was better. r~