Received: from spf5.us4.outblaze.com (spf5.us4.outblaze.com [205.158.62.27]) by sdf.lonestar.org (8.12.10/8.12.10) with ESMTP id iAAKTdE8002113 for ; Wed, 10 Nov 2004 20:29:39 GMT Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by spf5.us4.outblaze.com (Postfix) with ESMTP id 2F81F778C9 for ; Wed, 10 Nov 2004 20:26:16 +0000 (GMT) Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CRzB3-0000ys-JW for migo@homemail.com; Wed, 10 Nov 2004 15:34:49 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CRzAO-0000uY-FF for gnu-arch-users@gnu.org; Wed, 10 Nov 2004 15:34:09 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CRzAK-0000sH-T7 for gnu-arch-users@gnu.org; Wed, 10 Nov 2004 15:34:05 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CRzAK-0000rM-LU for gnu-arch-users@gnu.org; Wed, 10 Nov 2004 15:34:04 -0500 Received: from [83.216.134.182] (helo=cyclone.suffields.me.uk) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CRz0e-00008d-BV for gnu-arch-users@gnu.org; Wed, 10 Nov 2004 15:24:04 -0500 Received: from asuffield by cyclone.suffields.me.uk with local (Exim 3.36 #1 (Debian)) id 1CRz0d-00025T-00 for ; Wed, 10 Nov 2004 20:24:03 +0000 Date: Wed, 10 Nov 2004 20:24:03 +0000 From: Andrew Suffield To: gnu-arch-users@gnu.org Subject: Re: [Gnu-arch-users] Re: darcs vs tla Message-ID: <20041110202403.GC5978@suffields.me.uk> Mail-Followup-To: gnu-arch-users@gnu.org References: <20041107234609.7bf0abfe@delta.hk.office.outblaze.com> <877jowbl8w.fsf@tleepslib.sk.tsukuba.ac.jp> <1099920390.31269.11.camel@pc1117> <20041108150847.GB4720@suffields.me.uk> Mime-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.5.6+20040907i X-BeenThere: gnu-arch-users@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: a discussion list for all things arch-ish List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============1283937107==" Sender: gnu-arch-users-bounces+migo=homemail.com@gnu.org Errors-To: gnu-arch-users-bounces+migo=homemail.com@gnu.org Status: RO Content-Length: 3736 Lines: 103 --===============1283937107== Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ZmUaFz6apKcXQszQ" Content-Disposition: inline --ZmUaFz6apKcXQszQ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 09, 2004 at 06:54:02PM +0000, Kannan Goundan wrote: >=20 > > That sort of thing is why darcs is slow. Optimising Haskell programs > > is more or less equally difficult as optimising C programs (functional > > languages are not inherently any easier or harder to optimise), and > > the problems are pretty much the same. tla even has analogous issues > > (it tackles this problem differently, and I think does a little > > better in the amortised case, but it's far from optimal). >=20 > Since Haskell is, in a way, more strict and more restrictive, wouldn't it= be > easier for a compiler to optimize Haskell programs (since the code is bou= nded by > stronger guarantees)? Mmm. Sort of. It is easier for a Haskell compiler to perform a wide range of common optimisations, including all the ones that matter, on Haskell programs than it is for a C compiler to perform the same operations on a C program. > Dealing with side-effects and aliasing is a major pain > for C compilers. Haskell doesn't have any real advantages here; these particular problems don't exist but parallel ones do. Also, the semantics of C permit a sufficiently intelligent compiler to generate slightly more efficient code than an equivalent Haskell one, on the order of 5-10%, simply due to overheads demanded by the language. Not that any real-world compilers are up to that level. However, that is no substitute for source-level optimisations which a compiler cannot perform, and these are the ones I was referring to. Most real-world performance problems fall into this class nowadays - compiler improvements will never again give you an order of magnitude gain in real-world performance, with current languages and excluding pathological cases[0] (there are still worthwhile gains to be had from improving the compiler, because it increases the value of your hardware, but it won't solve your performance problems). This sort of optimisation doesn't get any easier to do in Haskell; in fact, we haven't yet found any language where they are easier. [0] Pathological cases here include any which break existing optimisations or which tickle obscure hardware behaviour unless the compiler explicitly allows for them. These are classified as bugs in the compiler. gcc has a whole pile of these. Backends which nobody has bothered to finish implementing don't count either (ia64, gcc currently utilises less than half the instructions this monster of a processor has available). --=20 .''`. ** Debian GNU/Linux ** | Andrew Suffield : :' : http://www.debian.org/ | `. `' | `- -><- | --ZmUaFz6apKcXQszQ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (GNU/Linux) iD8DBQFBknjjlpK98RSteX8RAoHmAJ9b3P0ibGO+UuFfKHG5BtZXFk2bIQCdHW3A vJ51HhgL8iKtFsV9b8eknds= =pK0l -----END PGP SIGNATURE----- --ZmUaFz6apKcXQszQ-- --===============1283937107== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Gnu-arch-users mailing list Gnu-arch-users@gnu.org http://lists.gnu.org/mailman/listinfo/gnu-arch-users GNU arch home page: http://savannah.gnu.org/projects/gnu-arch/ --===============1283937107==--