From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 4A04F7EE51 for ; Wed, 24 Apr 2013 19:35:26 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of Matteo.Frigo@qrclab.com) identity=pra; client-ip=50.195.56.241; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="Matteo.Frigo@qrclab.com"; x-sender="Matteo.Frigo@qrclab.com"; x-conformance=sidf_compatible Received-SPF: PermError (mail3-smtp-sop.national.inria.fr: cannot correctly interpret sender authenticity information from domain of Matteo.Frigo@qrclab.com) identity=mailfrom; client-ip=50.195.56.241; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="Matteo.Frigo@qrclab.com"; x-sender="Matteo.Frigo@qrclab.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@matteo.qrclab.com) identity=helo; client-ip=50.195.56.241; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="Matteo.Frigo@qrclab.com"; x-sender="postmaster@matteo.qrclab.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtYEAAoVeFEywzjx/2dsb2JhbABQDoMugmsBu3iBFnSCHwEBAwEBUyYFCwsOEyUPAQQoIROIDgYMvj+NeYE3B4NLA5ccgSWPe4JPWyCBLw X-IPAS-Result: AtYEAAoVeFEywzjx/2dsb2JhbABQDoMugmsBu3iBFnSCHwEBAwEBUyYFCwsOEyUPAQQoIROIDgYMvj+NeYE3B4NLA5ccgSWPe4JPWyCBLw X-IronPort-AV: E=Sophos;i="4.87,542,1363129200"; d="scan'208";a="12095128" Received: from alpha.qrclab.com (HELO matteo.qrclab.com) ([50.195.56.241]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 24 Apr 2013 19:35:25 +0200 Received: from mfrigo by matteo.qrclab.com with local (Exim 4.80) (envelope-from ) id 1UV3bG-00047I-2u; Wed, 24 Apr 2013 13:35:22 -0400 From: Matteo Frigo To: John Carr Cc: ygrek , caml-list@inria.fr References: <20130424183543.e3a4290382f7f9ce7b522a57@gmail.com> <201304241557.r3OFvT9a012995@outgoing.mit.edu> Date: Wed, 24 Apr 2013 13:35:22 -0400 In-Reply-To: <201304241557.r3OFvT9a012995@outgoing.mit.edu> (John Carr's message of "Wed, 24 Apr 2013 11:57:29 -0400") Message-ID: <87ppxjvnl1.fsf@matteo.qrclab.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Validation-by: athena@fftw.org Subject: Re: [Caml-list] ackermann microbenchmark strange results John Carr writes: > Try changing loop alignment by editing assembly code. The address of > ack is different in the different versions. Modern Intel processors are > sensitive to code alignment. There is a limit on the number of branch > prediction table entries per cache line. An instruction that crosses a > cache line boundary may be slower than an instruction within a cache > line. I am not surprised to see a 20% difference caused by an apparently > irrelevant code change. See also http://people.csail.mit.edu/nkushman/papers/ms-thesis.pdf for a detailed analysis of a related problem on older (1998) hardware.