<div dir="ltr">The science collection predates Typed Racket - among many other things. It is hand optimized using the fl- and fx- primitives, which were added before Typed Racked, but this misses some optimizations that Typed Racket is able to do. The biggest problem with the hand optimized code is that bugs tend to lead to seg faults rather than decent error messages. It also does some optimization of sequences to make some loops work better, but this mainly just affects the statistics routines.<div>

<br></div><div>I also added unchecked- versions to many/most of the computationally intensive routines to bypass the contract checks. This was important in the early days of the contracts, but I'm not so sure it is anymore. [The exception is the median and quantile routines that check for a sorted sequence and the contracts are O(n) while the code itself is O(1).</div>

<div><br></div><div>Doug</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Oct 28, 2013 at 12:51 AM, Konrad Hinsen <span dir="ltr"><<a href="mailto:konrad.hinsen@fastmail.net" target="_blank">konrad.hinsen@fastmail.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">Daniel King writes:<br>
<br>
 > I think Racket has the first three features (the math library looks<br>
 > awesome), but AFAICT it lacks a numerical optimizer. Has anyone<br>
<br>
</div>The math library *is* awesome (I have been discovering it myself<br>
during the last weeks). The only other source of math/science code<br>
I know of is Doug Williams' science collection on PLaneT:<br>
<br>
<a href="http://planet.racket-lang.org/display.ss?package=science.plt&owner=williams" target="_blank">http://planet.racket-lang.org/display.ss?package=science.plt&owner=williams</a><br>
<br>
I don't see any optimization routines in there, so you are probably<br>
right that there is none, at least nothing published.<br>
<span class="HOEnZb"><font color="#888888"><br>
Konrad.<br>
</font></span><div class="HOEnZb"><div class="h5">____________________<br>
  Racket Users list:<br>
  <a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
</div></div></blockquote></div><br></div>