From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:56475) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5Xi6-0005jq-GS for qemu-devel@nongnu.org; Mon, 19 Sep 2011 02:52:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R5Xi5-0006F3-Lf for qemu-devel@nongnu.org; Mon, 19 Sep 2011 02:52:10 -0400 Received: from one.firstfloor.org ([213.235.205.2]:39698) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R5Xi5-0006Ex-EB for qemu-devel@nongnu.org; Mon, 19 Sep 2011 02:52:09 -0400 Message-ID: <51221ff5190e1823f0d6b602c4ca0f4d.squirrel@www.firstfloor.org> In-Reply-To: <4E76305B.80108@redhat.com> References: <4E74FC29.1050003@mail.berlios.de> <1316289634-18786-5-git-send-email-weil@mail.berlios.de> <4E75865B.5040106@mail.berlios.de> <4E759C43.5070708@redhat.com> <4E76305B.80108@redhat.com> Date: Mon, 19 Sep 2011 08:52:05 +0200 From: "Andi Kleen" MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH 5/8] tcg: Add interpreter for bytecode List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: Paolo Bonzini , Andi Kleen , QEMU Developers > I think it also improves branch target prediction - if you have a tight > loop of a few opcodes the predictor can guess where you're headed (sinc= e > there is a separate lookup key for each opcode), whereas with the > original code, there's a single key which cannot be used to predict the > branch target. At least usually. I caught at least one version of gcc to CSE the jump instruction into a common location in one of my interpreters :-( But not all do it at least, and I hope gcc gets fixed. It's still faster for other reasons usually. -Andi