<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <font size="-1"><font face="Helvetica, Arial, sans-serif">Hi Chide,<br>
        <br>
        For data-intensive programming it will be worthwhile to design
        your data structures carefully. This depends of course on your
        application.<br>
        The Clean compiler offers you unique arrays that might be pretty
        suited here. The uniqueness enforces restrictions on the way you
        write your algorithms. The benefit is that all updates will be
        done in-place, i.e. without creating garbage.<br>
        When you use an unboxed array the elements become strict, but
        access and storage is very efficient.<br>
        <br>
        Below is an example of a program that creates matrix of the
        suggested size and applies a function to all its elements. My
        old laptop executes this in 0.25 s.<br>
        <br>
        Have fun,<br>
        <br>
        Pieter<br>
        <br>
        :: *Matrix :== {#{#Int}}<br>
        <br>
        matrix :: !Int !Int -&gt; Matrix<br>
        matrix n m = {{ j \\ j &lt;- [i..i+n-1]} \\ i &lt;- [0..m-1]}<br>
        <br>
        mapMatrix :: (Int -&gt; Int) !Matrix -&gt; Matrix<br>
        mapMatrix f matrix = {{f e \\ e &lt;-: a} \\ a &lt;-: matrix}<br>
        <br>
        test = (mapMatrix ((+) 7) myMatrix).[m-1].[n-1]<br>
        where<br>
        &nbsp;&nbsp;&nbsp; myMatrix = matrix n m<br>
        &nbsp;&nbsp;&nbsp; n = 30; m = 100000<br>
        <br>
        Start = test<br>
      </font></font><br>
    On 15/12/2011 10:57 AM, Groenouwe, C. wrote:
    <blockquote
      cite="mid:8F6DD0D591ECE64B859B081E73E2BEEF1C88DDDB@PEXMB002B.vu.local"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <style id="owaParaStyle" type="text/css">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
P {margin-top:0;margin-bottom:0;}</style>
      <div style="direction: ltr;font-family: Tahoma;color:
        #000000;font-size: 10pt;">
        <div style="direction: ltr; font-family: Tahoma; color: rgb(0,
          0, 0); font-size: 10pt;">
          I'm trying to find out:<br>
          - How, in general, functional programming languages perform on
          data-intensive tasks (manipulation of large datasets, e.g.:
          doing some statistical analysis on a table with 100.000
          instances and 30 columns) (regarding speed and memory usage)<br>
          - Which functional language performs best?<br>
          <br>
          A quick glance at the following benchmark, gave me the
          impression that Clean and Caml seem to perform best with
          regard to memory consumption:<br>
          <br>
          <a moz-do-not-send="true"
            href="http://shootout.alioth.debian.org/" target="_blank">http://shootout.alioth.debian.org/</a><br>
          <br>
          Is that true?<br>
          <br>
          Additional question: which functional languages exploits
          (hardware) parallelism running on a multi core CPU best? (Or
          more CPU's)?
          <br>
          <br>
          Thanks in advance,<br>
          <br>
          Chide<br>
          <br>
          <br>
          <br>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
clean-list mailing list
<a class="moz-txt-link-abbreviated" href="mailto:clean-list@science.ru.nl">clean-list@science.ru.nl</a>
<a class="moz-txt-link-freetext" href="http://mailman.science.ru.nl/mailman/listinfo/clean-list">http://mailman.science.ru.nl/mailman/listinfo/clean-list</a>
</pre>
    </blockquote>
  </body>
</html>