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=0.1 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 0224DBC37 for ; Sun, 27 Sep 2009 23:59:03 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiMCANp8v0rRVllCgmdsb2JhbACbAgEBCwsIBxUDtmmEHgU X-IronPort-AV: E=Sophos;i="4.44,461,1249250400"; d="scan'208";a="33647477" Received: from elasmtp-spurfowl.atl.sa.earthlink.net ([209.86.89.66]) by mail2-smtp-roc.national.inria.fr with ESMTP; 27 Sep 2009 23:59:02 +0200 Received: from [69.254.201.214] (helo=[10.0.1.2]) by elasmtp-spurfowl.atl.sa.earthlink.net with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.67) (envelope-from ) id 1Ms1ll-0001BB-9p; Sun, 27 Sep 2009 17:59:01 -0400 Cc: caml-list@yquem.inria.fr Message-Id: From: David McClain To: Jon Harrop In-Reply-To: <200909272025.39995.jon@ffconsultancy.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Subject: Re: [Caml-list] HLVM stuff Date: Sun, 27 Sep 2009 14:58:59 -0700 References: <200909272025.39995.jon@ffconsultancy.com> X-Mailer: Apple Mail (2.936) X-ELNK-Trace: 7a0ab3eafc8cf994b22988ad1c62733440683398e744b8a4d4fe066e7301f639b78123d5c6c6b5a3350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 69.254.201.214 X-Spam: no; 0.00; arrays:01 polymorphic:01 polymorphic:01 wrote:01 homogeneous:01 caml-list:01 functions:01 latter:03 handles:03 handles:03 dispatch:03 dispatch:03 element:03 implicit:03 dbm:03 On Sep 27, 2009, at 12:25 PM, Jon Harrop wrote: > where the "kthSmallest" and "Array2D.parallelInit" functions are both > polymorphic. The former handles implicit sequences of any comparable > type and > the latter handles 2D arrays of any element type. This use of > polymorphic But facing a situation with 2^26 pixels to process, I would never do that. I would write a type-specific function to apply. Why dispatch of every pixel of the aggregate, when I could dispatch once at the top, to decide what kind of homogeneous array... Dr. David McClain dbm@refined-audiometrics.com