From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: ** X-Spam-Status: No, score=2.8 required=5.0 tests=DNS_FROM_RFC_POST,SPF_NEUTRAL autolearn=disabled version=3.1.3 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 B5566BC37 for ; Wed, 29 Apr 2009 18:03:43 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnECABUX+ElIDtyfimdsb2JhbACDAJMwPwEBAQoJDAcPBaZcgQiREwEDAQODcgU X-IronPort-AV: E=Sophos;i="4.40,266,1238968800"; d="scan'208";a="26989346" Received: from fg-out-1718.google.com ([72.14.220.159]) by mail3-smtp-sop.national.inria.fr with ESMTP; 29 Apr 2009 18:03:43 +0200 Received: by fg-out-1718.google.com with SMTP id e12so399048fga.20 for ; Wed, 29 Apr 2009 09:03:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=eO0QNknwiL4ZQOWn4pL4csSgnwPw6cTkY3wdGk7Y+z0=; b=RRBWBXpVr12JXYr3c9mVrll7H24fJvLqCDP4EaHMAcPXA5A/utlRArpam3ROGFNAxg NN0mc4t/xqv7SfbiUF4FggmNBiSGZljH85zS7rtJmTNfaLzt12MpcmALSjNXIrCSa/Wa 8n+2vCfkzETAJWY+zOuKs9mXTzS7gBq/ZkuIQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=tvIT4/XmnGuHZ06TFHhMrV/S9oQN2FITSX90d4p67zxMgqsW3xm3tcGS65AIEhB+9y AH+okrkctUJYdlQPuOgD7wl3qqKM7giqvvGoshiKjGWG59iLk8I8KUgyy9YXih2K2wg/ MDtyCj66mEE0b2VQsVP3e1TGcQijxFPqCJGTo= MIME-Version: 1.0 Received: by 10.86.82.6 with SMTP id f6mr832177fgb.69.1241021022974; Wed, 29 Apr 2009 09:03:42 -0700 (PDT) In-Reply-To: <0FDD87FB-2461-4BBC-BDB1-5316A5AE4D23@inria.fr> References: <324B24CA-9671-42C0-B722-C7710C0C45C7@cs.berkeley.edu> <59BD1B3A-B449-4963-9910-ED5E755D00E6@cs.berkeley.edu> <49F7F135.5080504@gmail.com> <08C6A0FC-90F2-43A4-AB78-4A3B68291FAA@cs.berkeley.edu> <49F7F59B.7070204@frisch.fr> <6D9C5A68-1874-4BBC-AE3D-9CCC3614AF7C@cs.berkeley.edu> <0FDD87FB-2461-4BBC-BDB1-5316A5AE4D23@inria.fr> Date: Wed, 29 Apr 2009 12:03:42 -0400 Message-ID: Subject: Re: [Caml-list] Strange performance bug From: Markus Mottl To: Damien Doligez Cc: OCaml List Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam: no; 0.00; bug:01 markus:01 mottl:01 markus:01 mottl:01 damien:01 damien:01 pcre:01 pcre:01 regexp:01 allocations:01 regexps:01 ocaml:01 2009:98 48,:98 On Wed, Apr 29, 2009 at 10:48, Damien Doligez wro= te: > Markus, you put your finger right on the problem. =A0That program doesn't > suddenly start to get slow, it gets steadily slower as it runs. =A0The > heap also gets steadily bigger, and the major GC does way too much > work. Right, the combination of forcing the GC very often through PCRE and keeping an ever increasing number of values around obviously leads to this slowdown. > Maybe PCRE should change its settings to trigger GCs less often but, > as Markus said, this doesn't look really important. I've never seen a case in practice where correctly done regexp allocations happen so often that excessive full major collections are triggered. There is no optimal "general" setting for how aggressive the GC should be with regexps, but the current value should work fine for just about anybody. A still reasonable higher setting would probably not solve performance bugs of the sort above anyway. Regards, Markus --=20 Markus Mottl http://www.ocaml.info markus.mottl@gmail.com