From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49496) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ypslr-0006Ve-0t for qemu-devel@nongnu.org; Wed, 06 May 2015 02:25:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ypsln-0004n8-TD for qemu-devel@nongnu.org; Wed, 06 May 2015 02:25:26 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38043) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ypsln-0004mk-OA for qemu-devel@nongnu.org; Wed, 06 May 2015 02:25:23 -0400 From: Markus Armbruster References: <1430864578-22072-1-git-send-email-jsnow@redhat.com> <1430864578-22072-5-git-send-email-jsnow@redhat.com> Date: Wed, 06 May 2015 08:25:20 +0200 In-Reply-To: <1430864578-22072-5-git-send-email-jsnow@redhat.com> (John Snow's message of "Tue, 5 May 2015 18:22:57 -0400") Message-ID: <87pp6eusrz.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v3 4/5] qtest: precompute hex nibs List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Snow Cc: pbonzini@redhat.com, qemu-devel@nongnu.org, afaerber@suse.de John Snow writes: > Instead of letting printf and friends do this for us > one byte at a time, fill a buffer ourselves and then > send the entire buffer in one go. > > This gives a moderate speed improvement over the old > method. Out of curiosity: how much of the improvement is due to doing our own buffering instead of printf()'s (assuming the stream is buffered), and how much is due to doing our own hex formatting instead of printf()'s?