From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:42586) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R58b1-0003jG-JR for qemu-devel@nongnu.org; Sun, 18 Sep 2011 00:03:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R58b0-00075x-FK for qemu-devel@nongnu.org; Sun, 18 Sep 2011 00:03:11 -0400 Received: from mga14.intel.com ([143.182.124.37]:45372) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R58b0-00074q-5Z for qemu-devel@nongnu.org; Sun, 18 Sep 2011 00:03:10 -0400 From: Andi Kleen References: <4E74FC29.1050003@mail.berlios.de> <1316289634-18786-5-git-send-email-weil@mail.berlios.de> Date: Sat, 17 Sep 2011 21:03:05 -0700 In-Reply-To: <1316289634-18786-5-git-send-email-weil@mail.berlios.de> (Stefan Weil's message of "Sat, 17 Sep 2011 22:00:31 +0200") Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: Stefan Weil Cc: QEMU Developers Stefan Weil writes: > + > + switch (opc) { > + case INDEX_op_end: > + case INDEX_op_nop: > + break; You could probably get some more speed out of this by using a threaded interpreter with gcc's computed goto extension. That's typically significantly faster than a plain switch in a loop. static void *ops[] = { &&op1, &&op2, ... }; #define NEXT() goto *ops[*tb_ptr++]; op1: ... NEXT(); -Andi -- ak@linux.intel.com -- Speaking for myself only