From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 5b1e799cdb,3ef3e78eacf6f938 X-Google-Attributes: gid5b1e799cdb,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!backlog2.nntp.dca.giganews.com!nntp.brightview.co.uk!news.brightview.co.uk.POSTED!not-for-mail NNTP-Posting-Date: Wed, 22 Jul 2009 03:27:59 -0500 From: Jon Harrop Subject: Re: Alternatives to C: ObjectPascal, Eiffel, Ada or Modula-3? Newsgroups: comp.lang.eiffel,comp.lang.ada,comp.lang.modula3,comp.programming Followup-To: comp.lang.eiffel,comp.lang.ada,comp.lang.modula3,comp.programming Date: Wed, 22 Jul 2009 10:37:38 +0100 References: <51617b48-400b-4296-9362-78aa712bb6b2@a7g2000yqk.googlegroups.com> <4a65e4a2$0$30235$9b4e6d93@newsspool1.arcor-online.net> Organization: Flying Frog Consultancy Ltd. User-Agent: KNode/0.10.9 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit Message-ID: X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-Bp8AMR6LFkP9rLpwdSLQni0azPjMzwc27NzsCDy/i+erTE5nlfvY0B7lVcrtsbQRtGGPv3YmG2G/jQ2!OJzIblbxQdELRSE5zXciI5sVBTzUtb3YDCwUBE9KpGt9cCUbJGwBEg/WdtVMPD3kBlwQOtnJyJHo!gXYV0onLqKzxe5910KH+Ld2v X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.39 X-Original-Bytes: 2962 Xref: g2news2.google.com comp.lang.eiffel:389 comp.lang.ada:7264 comp.lang.modula3:86 comp.programming:11969 Date: 2009-07-22T10:37:38+01:00 List-Id: Georg Bauhaus wrote: > Chris Okasaki has an entertaining assessment of functional > programming in Ada 2005: > http://okasaki.blogspot.com/2008/07/functional-programming-inada.html Right. I had read that before... > But why not show or point to some striking example of what > is possible to achieve, result-wise, in number-crunching or > scientific computing with full "closures" that is demonstrably > difficult or cumbersome to do using generics, downward "closures" > and objects only. Currying and, therefore, partial application are the most obvious examples. I recently wrote an F# implementation of QR decomposition that is up to 3x faster than the Intel MKL (!). I first wrote it with explicit copies. Then I rephrased it to index everything via functions (making heavy use of partial application) rather than explicit data structures (creating "views" of the matrix without copying it). Then I rearranged those to make them more cache coherent and finally introduced parallelism. There is a brief description here: http://flyingfrogblog.blogspot.com/2009/07/ocaml-vs-f-qr-decomposition.html Moreover, my implementation is parameterized over its element type and operations so it can be applied to single or double precision or even symbolic matrices. -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com/?u