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 concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 18B83BB84 for ; Thu, 18 May 2006 20:19:28 +0200 (CEST) Received: from smtp1.adl2.internode.on.net (smtp1.adl2.internode.on.net [203.16.214.181]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id k4IIJP13017884 for ; Thu, 18 May 2006 20:19:27 +0200 Received: from rosella (ppp28-237.lns1.syd2.internode.on.net [59.167.28.237] (may be forged)) by smtp1.adl2.internode.on.net (8.13.6/8.13.5) with ESMTP id k4IIJHrm010269; Fri, 19 May 2006 03:49:18 +0930 (CST) (envelope-from skaller@users.sourceforge.net) Subject: Re: [Caml-list] compiler bug? From: skaller To: Jacques Carette Cc: caml-list@yquem.inria.fr In-Reply-To: <446CB021.6000009@mcmaster.ca> References: <20060517231426.30289.qmail@web32203.mail.mud.yahoo.com> <446CABCA.8000906@inria.fr> <446CB021.6000009@mcmaster.ca> Content-Type: text/plain Date: Fri, 19 May 2006 04:19:17 +1000 Message-Id: <1147976357.25630.27.camel@rosella.wigram> Mime-Version: 1.0 X-Mailer: Evolution 2.4.1 Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 446CBAAD.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; compiler:01 bug:01 compilers:01 compiler:01 ocamlopt:01 inlining:01 trivial:01 2006:98 fervent:98 wrote:01 sourceforge:01 caml-list:01 integrating:01 jacques:01 semantic:02 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 On Thu, 2006-05-18 at 13:34 -0400, Jacques Carette wrote: > It is my impression that users of compilers are "ready" for the > following situation: > 1) an optimizing compiler (like ocamlopt!) that produces good code > efficiently > 2) a super-optimizing compiler that produces fantastic code, at whatever > cost. > > Such a compiler would probably rapidly find a niche of fervent users. What about high level optimisations? Felix supports this: reduce revrev[t] (x:list[t]): rev (rev x) => x; which, combined with inlining, removes adjacent list reversals. This is a fairly trivial example of integrating logic with programming as a way of achieving both correctness and performance: the reduction above provides both semantic knowledge to the reader as well as allowing the compiler to generate better code. -- John Skaller Felix, successor to C++: http://felix.sf.net