<?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="2003/01/740ca05b3cb0c3e686a3998768c3564e"
  from="David Chase &lt;chase@w...&gt;"
  author="David Chase"
  date="2003-01-20T21:23:26"
  subject="Re: Coyote Gulch test in Caml (was Re: [Caml-list] speed )"
  prev="2003/01/a7f0ca55dfc7972117511c4551434184"
  next="2003/01/9237a1295600c54fc49c20a8c1967a3f"
  prev-in-thread="2003/01/17988bbd59483df8228db980cf6789fe"
  next-in-thread="2003/01/9237a1295600c54fc49c20a8c1967a3f"
  prev-thread="2003/01/48b807e3da767c9c00767bf580dd3d3c"
  next-thread="2003/01/d89aa4bddc31c6f04c1b3b3cc50d0853"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] speed">
<msg 
  url="2003/01/564b13bda6a36ad2f6b58a1b2caae8b7"
  from="onlyclimb &lt;onlyclimb@1...&gt;"
  author="onlyclimb"
  date="2003-01-03T08:01:16"
  subject="[Caml-list] speed">
<msg 
  url="2003/01/6396a50720af493ebecfe69e70d65210"
  from="Clemens Hintze &lt;ml-ocaml@q...&gt;"
  author="Clemens Hintze"
  date="2003-01-03T11:40:04"
  subject="[Caml-list] Re: speed">
</msg>
<msg 
  url="2003/01/0c4ef0e894b828576d2829f4be49ccf7"
  from="Noel Welsh &lt;noelwelsh@y...&gt;"
  author="Noel Welsh"
  date="2003-01-03T11:47:56"
  subject="Re: [Caml-list] speed">
<msg 
  url="2003/01/5939290091b9aef1bbf2a819582f4646"
  from="Chet Murthy &lt;chet@w...&gt;"
  author="Chet Murthy"
  date="2003-01-03T12:46:02"
  subject="Re: [Caml-list] speed ">
</msg>
</msg>
<msg 
  url="2003/01/7f3e0f0d40f2c3480534632092c477ce"
  from="Xavier Leroy &lt;xavier.leroy@i...&gt;"
  author="Xavier Leroy"
  date="2003-01-03T13:32:30"
  subject="Re: [Caml-list] speed">
<msg 
  url="2003/01/5feeb124e6be296bb910526dd7e54fa5"
  from="Chet Murthy &lt;chet@w...&gt;"
  author="Chet Murthy"
  date="2003-01-03T14:39:21"
  subject="Re: [Caml-list] speed ">
<msg 
  url="2003/01/1b59aa51ded51a144ef03855ffa0454f"
  from="Sven Luther &lt;luther@d...&gt;"
  author="Sven Luther"
  date="2003-01-03T14:53:44"
  subject="Re: [Caml-list] speed">
<msg 
  url="2003/01/0f323657ee94c6b6ec75dd120b80acc1"
  from="Erol Akarsu &lt;eakarsu@c...&gt;"
  author="Erol Akarsu"
  date="2003-01-03T15:30:13"
  subject="Re: [Caml-list] speed">
</msg>
</msg>
</msg>
<msg 
  url="2003/01/e671f63faa6e60a2d46808e7a5be3c21"
  from="Chet Murthy &lt;chet@w...&gt;"
  author="Chet Murthy"
  date="2003-01-03T14:40:28"
  subject="Coyote Gulch test in Caml (was Re: [Caml-list] speed )">
<msg 
  url="2003/01/84db8a13e8a42079be430c11235ea1b0"
  from="Shawn Wagner &lt;shawnw@s...&gt;"
  author="Shawn Wagner"
  date="2003-01-03T15:02:10"
  subject="Re: Coyote Gulch test in Caml (was Re: [Caml-list] speed )">
<msg 
  url="2003/01/99cd8b7b3ca0d9d001871a37a4eba80f"
  from="Oleg &lt;oleg_inconnu@m...&gt;"
  author="Oleg"
  date="2003-01-03T15:56:32"
  subject="Re: Coyote Gulch test in Caml (was Re: [Caml-list] speed )">
</msg>
<msg 
  url="2003/01/cfbfbda8c795246f69950e2e8ea00083"
  from="Xavier Leroy &lt;xavier.leroy@i...&gt;"
  author="Xavier Leroy"
  date="2003-01-04T18:31:20"
  subject="Re: Coyote Gulch test in Caml (was Re: [Caml-list] speed )">
<msg 
  url="2003/01/07ee33d3bd5bd0038b30b98207b154b7"
  from="Oleg &lt;oleg_inconnu@m...&gt;"
  author="Oleg"
  date="2003-01-18T22:50:01"
  subject="Re: Coyote Gulch test in Caml (was Re: [Caml-list] speed )">
<msg 
  url="2003/01/17988bbd59483df8228db980cf6789fe"
  from="Shawn Wagner &lt;shawnw@s...&gt;"
  author="Shawn Wagner"
  date="2003-01-18T23:40:31"
  subject="Re: Coyote Gulch test in Caml (was Re: [Caml-list] speed )">
<msg 
  url="2003/01/740ca05b3cb0c3e686a3998768c3564e"
  from="David Chase &lt;chase@w...&gt;"
  author="David Chase"
  date="2003-01-20T21:23:26"
  subject="Re: Coyote Gulch test in Caml (was Re: [Caml-list] speed )">
<msg 
  url="2003/01/9237a1295600c54fc49c20a8c1967a3f"
  from="Nickolay Semyonov-Kolchin &lt;snob@s...&gt;"
  author="Nickolay Semyonov-Kolchin"
  date="2003-01-20T23:51:44"
  subject="Re: Coyote Gulch test in Caml (was Re: [Caml-list] speed )">
<msg 
  url="2003/01/17b1dc91d01127781c5512160ebe2b0a"
  from="Brian Hurt &lt;brian.hurt@q...&gt;"
  author="Brian Hurt"
  date="2003-01-21T00:45:26"
  subject="Re: Coyote Gulch test in Caml (was Re: [Caml-list] speed )">
</msg>
<msg 
  url="2003/01/16f3332b61c5c9621ff8ca3d298d6272"
  from="David Chase &lt;chase@w...&gt;"
  author="David Chase"
  date="2003-01-21T13:09:12"
  subject="Re: Coyote Gulch test in Caml (was Re: [Caml-list] speed )">
<msg 
  url="2003/01/3e8e2b27f149125d2bc79f8f81f7238e"
  from="Daniel Andor &lt;da209@c...&gt;"
  author="Daniel Andor"
  date="2003-01-21T13:16:48"
  subject="Re: Coyote Gulch test in Caml (was Re: [Caml-list] speed )">
</msg>
<msg 
  url="2003/01/f781fbd10809682f5020b87923bff572"
  from="Nickolay Semyonov-Kolchin &lt;snob@s...&gt;"
  author="Nickolay Semyonov-Kolchin"
  date="2003-01-22T07:22:18"
  subject="Re: Coyote Gulch test in Caml (was Re: [Caml-list] speed )">
</msg>
</msg>
</msg>
</msg>
</msg>
<msg 
  url="2003/01/2e377a963ff1b981e10398add3c66047"
  from="Siegfried Gonzi &lt;siegfried.gonzi@s...&gt;"
  author="Siegfried Gonzi"
  date="2003-01-19T09:43:32"
  subject="Re: Coyote Gulch test in Caml (was Re: [Caml-list] speed )">
</msg>
<msg 
  url="2003/01/74a07e460d4553cfd41d33453e245700"
  from="Siegfried Gonzi &lt;siegfried.gonzi@s...&gt;"
  author="Siegfried Gonzi"
  date="2003-01-19T09:45:19"
  subject="Re: Coyote Gulch test in Caml (was Re: [Caml-list] speed )">
</msg>
<msg 
  url="2003/01/826f0fbaad9a50b70a73bc0e8f5f0fde"
  from="Xavier Leroy &lt;xavier.leroy@i...&gt;"
  author="Xavier Leroy"
  date="2003-01-21T09:56:51"
  subject="[Caml-list] Re: Coyote Gulch test in Caml">
<msg 
  url="2003/01/eea86615e9ca47c169bfb91694fa15f2"
  from="Brian Hurt &lt;brian.hurt@q...&gt;"
  author="Brian Hurt"
  date="2003-01-21T15:48:19"
  subject="Re: [Caml-list] Re: Coyote Gulch test in Caml">
</msg>
<msg 
  url="2003/01/32a48fbbe8cc060ff33f9088ef0b64c6"
  from="Daniel Andor &lt;da209@c...&gt;"
  author="Daniel Andor"
  date="2003-01-27T16:59:52"
  subject="Re: [Caml-list] Re: Coyote Gulch test in Caml">
<msg 
  url="2003/01/82d94403680b52187ef16b17c0a53ee4"
  from="Christian Lindig &lt;lindig@e...&gt;"
  author="Christian Lindig"
  date="2003-01-30T07:41:25"
  subject="Re: [Caml-list] Re: Coyote Gulch test in Caml">
</msg>
</msg>
</msg>
</msg>
</msg>
</msg>
</msg>
<msg 
  url="2003/01/1c1f2f0f451d19c581c4bdf0276d6994"
  from="Brian Hurt &lt;brian.hurt@q...&gt;"
  author="Brian Hurt"
  date="2003-01-05T01:05:00"
  subject="Re: [Caml-list] speed">
<msg 
  url="2003/01/bf543fdffa5461b710cb9940d1260e33"
  from="Michael Vanier &lt;mvanier@c...&gt;"
  author="Michael Vanier"
  date="2003-01-05T20:17:34"
  subject="Re: [Caml-list] speed">
</msg>
</msg>
</msg>
</msg>
</thread>

<contents>
At 03:50 PM 1/18/2003 -0800, Shawn Wagner wrote:
&gt;On Sat, Jan 18, 2003 at 05:49:47PM -0500, Oleg wrote:
&gt;&gt; On Saturday 04 January 2003 01:31 pm, Xavier Leroy wrote:
&gt;&gt; &gt; Apparently, the ocamlopt-generated code
&gt;&gt; &gt; offers less instruction-level parallelism than the g++-generated code
&gt;&gt; &gt; for the float computations.  Still, I haven't really understood where
&gt;&gt; &gt; the factor of 2 comes from.  
&gt;
&gt;&gt; Just as wild guess: the code contains calls to "sin" and "cos" on the same 
&gt;&gt; value. Perhaps GCC manages to optimize those into one call to "sincos"
&gt;
&gt;It doesn't. I tried making a C++ version that does when I was fooling around
&gt;with it. Didn't really help. The single greatest speed increase I got (Which
&gt;did something like cut the runtime in half) was -ffast-math, which cuts out
&gt;the trig function calls in favor of direct use of the proper x86
&gt;instructions. But the inlined-sincos (__sincos()) in glibc causes a segfault
&gt;on my athlon when I tried using it. :P

Just a silly question, but if you want sin and cos to go faster,
how much accuracy are you willing to trade away for improved
performance?  Just for example, by using the Pentium instructions,
you reduce the number of (accurate) significant bits in the result
from 53 (IEEE double) to 13 (for some inputs between zero and 2*PI).
(If you are using 64-bit mantissas, the worst case is only 4 bits of
accuracy.)

I've noticed over the years that people focus on speed over many other
things, usually because they can measure it.  Well, we can measure
accuracy of transcendental functions, too, so I thought I would
ask the question.  How much is enough for your application?  Of the
languages being benchmarked, which one has the most accurate
transcendental functions?  Is this less important than speed?

David Chase


-------------------
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>

