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 mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 17A34BC57 for ; Fri, 3 Dec 2010 22:42:40 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApIAAG/z+EzRVaE0kGdsb2JhbACDUJFUjg4IFQEBAgkJDAcRBB6pGYksPIIYhH4uiFYBAQMFgRyDNHMEimuDeoEebA X-IronPort-AV: E=Sophos;i="4.59,295,1288566000"; d="scan'208";a="69185783" Received: from mail-fx0-f52.google.com ([209.85.161.52]) by mail3-smtp-sop.national.inria.fr with ESMTP; 03 Dec 2010 22:42:39 +0100 Received: by fxm5 with SMTP id 5so8072205fxm.39 for ; Fri, 03 Dec 2010 13:42:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject :message-id:in-reply-to:references:x-mailer:mime-version :content-type:content-transfer-encoding; bh=qbBm5SXeDrE1mMTFgd0ieO8r1tXF6IlfxV7b+omP+Ps=; b=q3fD9F8bm/VlZ1PAIsC5svs8oUHmEMqDD5ESpWdsy/rroKahB2g++gnNRCEcy5+6mR NsQGDUV3IXXwkWEOtEYPdYoplXswAWwNkmxa0aI7ELaJ/496+EgTd1/eG3LbQmuW6KqG ULRfsP+UN8zeox+H3QUKVWxpedQmh/kLz2QQE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding; b=UdGyN6DK/CtSw+UrM07TffDGTvLHBekYspUS4fLosvwfWZOY+jwsk42JFY9cFRoqVH tgWS09EKvMTtT9kcx2C8Cm7l64/ct+Of7EobsKLJGOf7BgW/4u4vYJlv6Umb8ncDTmmJ Gi09AkASRE6KhcUAB+tuswFpaSMXgg4p6KTl0= Received: by 10.223.97.75 with SMTP id k11mr966925fan.85.1291412559506; Fri, 03 Dec 2010 13:42:39 -0800 (PST) Received: from lemon.local.tld (33-60-133-95.pool.ukrtel.net [95.133.60.33]) by mx.google.com with ESMTPS id n7sm791845fam.35.2010.12.03.13.42.38 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 03 Dec 2010 13:42:38 -0800 (PST) Date: Fri, 3 Dec 2010 23:42:31 +0200 From: ygrek To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] optimizing caml_modify [was OCaml GC [was Is OCaml fast?]] Message-Id: <20101203234231.04e2f516.ygrekheretix@gmail.com> In-Reply-To: <20101202170759.1c9feec6@deb0> References: <1290434674.16005.354.camel@thinkpad> <582306206.731582.1290438133628.JavaMail.root@zmbs4.inria.fr> <20101122203334.7adc5ee6@deb0> <20101127221121.0920db65@ordinaves.concept-micro.com> <4CF25878.4060202@univ-savoie.fr> <916556265.243293.1291069665032.JavaMail.root@zmbs1.inria.fr> <0EC166A9-4CBE-48D2-89CD-E50CD8191E11@inria.fr> <20101202170759.1c9feec6@deb0> X-Mailer: Sylpheed 3.0.2 (GTK+ 2.20.1; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam: no; 0.00; ocaml:01 ocaml:01 gcc:01 ocamlopt:01 bug:01 edwin:98 wrote:01 caml-list:01 caml:02 btw:03 btw:03 optimizing:03 optimized:04 upstream:04 size:95 On Thu, 2 Dec 2010 17:07:59 +0200 Török Edwin wrote: > BTW I was also looking at ways to speed up mark_slice and sweep_slice, > (which is not easy since it is mostly optimized already). > Found a place where GCC is not smart enough though. Attached patch > improves GC sweep_slice by 3% - 10% in ocamlopt, depending on CPU (3% > Intel, 10% AMD Phenom II X6). Should I open a bug and attach it? BTW, while we are on this topic, why the following is not in upstream yet? http://eigenclass.org/R2/writings/optimizing-caml_modify Looks like a clear win-win without drawbacks (increased code size shouldn't be significant cause Modify is only used in a couple of places). What do you think? PS I was hoping Mauricio will push it to bugtracker or start discussion but apparently this didn't happen so here we go - stealing the flag, sorry :) -- ygrek http://ygrek.org.ua