<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2002/07/7f6e58388b6fcd30627883ac681ff89c"
  from="Oleg &lt;oleg_inconnu@m...&gt;"
  author="Oleg"
  date="2002-07-21T00:47:37"
  subject="Re: [Caml-list] Bigarray map &amp; set/get (long)"
  prev="2002/07/381836b19f58c5e7517450e8e96212d2"
  next="2002/07/ceef67ffac4fa576044134564c761207"
  prev-in-thread="2002/07/16814c22c2ab33015026d759c5d6f226"
  next-in-thread="2002/07/133a762c6b32cf03f761f4230b1561c8"
  prev-thread="2002/07/1ba7258845ed8bd9491c0456e7a05b1e"
  next-thread="2002/07/baaa01d7b8a97fafc2d4150df5a3a6fd"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] Bigarray map &amp; set/get (long)">
<msg 
  url="2002/07/ed6e258ddd3082e1de940b5ff3b369ea"
  from="Christophe TROESTLER &lt;Christophe.Troestler@u...&gt;"
  author="Christophe TROESTLER"
  date="2002-07-20T14:20:27"
  subject="[Caml-list] Bigarray map &amp; set/get (long)">
<msg 
  url="2002/07/16814c22c2ab33015026d759c5d6f226"
  from="Daniel de Rauglaudre &lt;daniel.de_rauglaudre@i...&gt;"
  author="Daniel de Rauglaudre"
  date="2002-07-20T18:29:15"
  subject="Re: [Caml-list] Bigarray map &amp; set/get (long)">
</msg>
<msg 
  url="2002/07/7f6e58388b6fcd30627883ac681ff89c"
  from="Oleg &lt;oleg_inconnu@m...&gt;"
  author="Oleg"
  date="2002-07-21T00:47:37"
  subject="Re: [Caml-list] Bigarray map &amp; set/get (long)">
<msg 
  url="2002/07/133a762c6b32cf03f761f4230b1561c8"
  from="Christophe TROESTLER &lt;Christophe.Troestler@u...&gt;"
  author="Christophe TROESTLER"
  date="2002-07-23T20:22:07"
  subject="Re: [Caml-list] Bigarray map &amp; set/get">
</msg>
</msg>
<msg 
  url="2002/07/b7841084f82ad9e51765e3357d07ea48"
  from="Xavier Leroy &lt;xavier.leroy@i...&gt;"
  author="Xavier Leroy"
  date="2002-07-22T09:31:44"
  subject="Re: [Caml-list] Bigarray map &amp; set/get (long)">
<msg 
  url="2002/07/2b08843c2f8529ab4a5eedce49929387"
  from="Fernando Alegre &lt;fernando@c...&gt;"
  author="Fernando Alegre"
  date="2002-07-22T15:43:31"
  subject="Re: [Caml-list] Bigarray map &amp; set/get (long)">
</msg>
<msg 
  url="2002/07/a769b8a76ed8b30094378a9caa9ea02b"
  from="Christophe TROESTLER &lt;Christophe.Troestler@u...&gt;"
  author="Christophe TROESTLER"
  date="2002-07-23T20:19:22"
  subject="Re: [Caml-list] Bigarray map &amp; set/get">
</msg>
<msg 
  url="2002/07/763129ca4fe6154a65c88d7da6b7959c"
  from="Chris Hecker &lt;checker@d...&gt;"
  author="Chris Hecker"
  date="2002-07-25T03:23:11"
  subject="Re: [Caml-list] Bigarray map &amp; set/get (long)">
<msg 
  url="2002/07/51745bbdd0ecdc6a7a43fccfff18d61e"
  from="Xavier Leroy &lt;xavier.leroy@i...&gt;"
  author="Xavier Leroy"
  date="2002-07-25T09:31:22"
  subject="Re: [Caml-list] Bigarray map &amp; set/get (long)">
<msg 
  url="2002/07/051fb722e8cf6e3d6ab4210e82f4c243"
  from="Chris Hecker &lt;checker@d...&gt;"
  author="Chris Hecker"
  date="2002-07-25T18:24:30"
  subject="Re: [Caml-list] Bigarray map &amp; set/get (long)">
<msg 
  url="2002/07/24ceafe927865c0a249fe1cee8b3c7c7"
  from="Michael Vanier &lt;mvanier@c...&gt;"
  author="Michael Vanier"
  date="2002-07-26T21:51:12"
  subject="Re: [Caml-list] Bigarray map &amp; set/get (long)">
<msg 
  url="2002/07/579eb5dc14be1c802d8043f96c7e96d7"
  from="Chris Hecker &lt;checker@d...&gt;"
  author="Chris Hecker"
  date="2002-07-26T22:37:15"
  subject="wanted features (was: Re: [Caml-list] Bigarray map &amp; set/get (long))">
<msg 
  url="2002/07/87d4e5dfb5ea475448d2bc51ecccb90d"
  from="Michael Vanier &lt;mvanier@c...&gt;"
  author="Michael Vanier"
  date="2002-07-27T22:01:52"
  subject="Re: wanted features (was: Re: [Caml-list] Bigarray map &amp; set/get (long))">
<msg 
  url="2002/07/7b2c14348f27a8845ae2d4b2a9d58b49"
  from="Chris Hecker &lt;checker@d...&gt;"
  author="Chris Hecker"
  date="2002-07-26T22:48:37"
  subject="Re: wanted features (was: Re: [Caml-list] Bigarray map &amp; set/get (long))">
<msg 
  url="2002/07/5608bba0b3e126c6176446238a91af17"
  from="Michael Vanier &lt;mvanier@c...&gt;"
  author="Michael Vanier"
  date="2002-07-27T22:02:15"
  subject="Re: wanted features (was: Re: [Caml-list] Bigarray map &amp; set/get (long))">
<msg 
  url="2002/07/6fb5deefe427195778984eef0ee6d0ee"
  from="Chris Hecker &lt;checker@d...&gt;"
  author="Chris Hecker"
  date="2002-07-27T00:36:46"
  subject="Re: wanted features (was: Re: [Caml-list] Bigarray map &amp; set/get (long))">
<msg 
  url="2002/07/48145749fb05dbc641b08cc3c73dea0b"
  from="Dimitri Ara &lt;dimitri@n...&gt;"
  author="Dimitri Ara"
  date="2002-07-27T12:06:11"
  subject="Re: wanted features (was: Re: [Caml-list] Bigarray map &amp; set/get (long))">
</msg>
<msg 
  url="2002/07/ced8870b7d5cbdccff4a58acca97dcb0"
  from="Dimitri Ara &lt;dimitri@n...&gt;"
  author="Dimitri Ara"
  date="2002-07-27T21:59:32"
  subject="Re: wanted features (was: Re: [Caml-list] Bigarray map &amp; set/get (long))">
</msg>
</msg>
</msg>
</msg>
</msg>
</msg>
</msg>
</msg>
</msg>
</msg>
</msg>
</msg>
</thread>

<contents>
On Friday 19 July 2002 09:59 am, Christophe TROESTLER wrote:
&gt; let mac out a b c =
&gt;   for i = 1 to Array2.dim1 a do
&gt;     for j = 1 to Array2.dim2 a do
&gt;       out.{i,j} &lt;- a.{i,j} +. b.{i,j} *. c.{i,j}
&gt;     done
&gt;   done;
&gt;   out

Chris, 

If you are using fortran layout (column-major) why are you incrementing rows 
in the inner-most loop? (AFAICR this can make a big difference with GCC, 
perhaps O'Caml too). Also, each loop seems to contain a call to function 
Array2.dim2. Can't this number be cached? Thirdly, does bigarray access check 
bounds? Can this be turned off? And finally, you might try to experiment with 
0-based indexing [1], it may turn out to be faster.

HTH
Let me/us know how this turns out,
Oleg

[1] I absolutely abhor 0-based indexing in most modern languages
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners

</contents>

</message>

