From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id E9B1EBB83 for ; Wed, 26 Apr 2006 00:52:38 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id k3PMqbBl013147 for ; Wed, 26 Apr 2006 00:52:38 +0200 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id AAA19386 for ; Wed, 26 Apr 2006 00:52:37 +0200 (MET DST) Received: from web50414.mail.yahoo.com (web50414.mail.yahoo.com [206.190.39.109]) by nez-perce.inria.fr (8.13.0/8.13.0) with SMTP id k3PMqabV013142 for ; Wed, 26 Apr 2006 00:52:36 +0200 Received: (qmail 20311 invoked by uid 60001); 25 Apr 2006 22:52:32 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=Kf6OrKivUE6QrJIYBNmrP0IxDUqLbGuTYN0W/P6JDJuNf2fNA5DfG4IFtwMI5MxSpyZdEbjQMH0IEfNHgXJJDEWmNNIewqSVZXfRLZ2DEf2hVrbQi0Scyz5JM2Xm09VaT32HzgVVw+PNauK/R9pPGQULv0J9jhOvq6E2YDhtK1k= ; Message-ID: <20060425225232.20309.qmail@web50414.mail.yahoo.com> Date: Tue, 25 Apr 2006 15:52:32 -0700 (PDT) From: Joaquin Cuenca Abela Reply-To: Joaquin Cuenca Abela Subject: Re: [Caml-list] Re: Performance of threaded interpreter on hyper-threaded CPU To: caml-list@inria.fr In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Miltered: at nez-perce with ID 444EA835.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 444EA834.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; gcc's:01 gcc:01 noticable:01 fwiw:01 gcc:01 pushes:01 jmp:01 cheers:01 wrote:01 caml-list:01 michel:01 assembler:02 threaded:03 threaded:03 opcodes:03 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: ** X-Spam-Status: No, score=2.2 required=5.0 tests=FORGED_YAHOO_RCVD autolearn=disabled version=3.0.3 Michel wrote: > I'm aware of the problem due to gcc's cross-jumping "optimisation" > (described as you mention by Ertl in [1]). For the record, I tried > disabling it with -fno-crossjumping, but as Ertl mention, this didn't > change anything. However, judging by the versions of gcc I'm using, > cross-jumping should also be performed on the second machine, for > which threaded code provides a noticable gain... Hi, FWIW, I did some tests with gcc 3.4.2, and -fno-crossjumping works *sometimes*. If you combine it with -O2 *and* your virtual machine has less than 10 opcodes (??) then -fno-crossjumping works as expected. Otherwise (ie, with any real virtual machine) gcc generates an extra jump, but you don't get exactly the same assembler than if you use a switched vm. The assembly for the switched vm pushes more instructions in the extra basic block than the assembly for the threaded vm. In the threaded vm, the extra block is only (in my test) a jmp *%eax. Cheers, -- Joaquin Cuenca Abela