<div dir="ltr">Indeed. Type annotations, inlining, and writing monomorphic functions are quite handy for making tight inner loops.<div><br></div><div style>As are making sure there are no bad branch predictors, that memory locality quality is superb, and that if possible SIMD instructions, and cache hierarchy aware parallelism.</div>

<div style><br></div><div style>At the same time, these are not AND should not be the concerns of normal end user codes. Tuning tight inner loops is a nontrivial task engineering task in any language, providing generic apis by default does not prevent writing monomorphic versions as needed.</div>

<div style><br></div><div style>Unless you have an example where for normal application code there will be a significant constant factor difference in performance with the proposed changes, i don&#39;t understand your contention :) </div>

<div style><br></div><div style>Also, for those sorts of problems as you point at, what is an example that can&#39;t be resolved with the inlinable + specialize pragmas, that wouldn&#39;t otherwise be a problem anyways?</div>

<div style><br></div><div style>Anyways, I do care about performance, but small constant factors are cheaper to fix if need be than are the constant factors in better base api. Anyone who&#39;s privy to my work over the past few months know I quite literally spend all my time thinking about memory locality :) </div>

<div style><br></div><div style>cheers</div><div style>-Carter</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, May 26, 2013 at 5:21 AM, Malcolm Wallace <span dir="ltr">&lt;<a href="mailto:malcolm.wallace@me.com" target="_blank">malcolm.wallace@me.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im"><br>
On 21 May 2013, at 06:06, Carter Schonwald wrote:<br>
<br>
&gt; lets see what concerns there are<br>
&gt;<br>
&gt; 1) will any code break? Nope!<br>
</div><div class="im">&gt; 2) does the change make learning the language more challenging? No.<br>
<br>
</div>One concern that is conspicuously missing from your list is<br>
<br>
3) performance.  Will my code get slower, because it now has many more class dictionaries, requiring new runtime indirections?<br>
<br>
I quote from the GHC manual:<br>
<br>
&quot;Overloaded functions are not your friend:<br>
Haskell&#39;s overloading (using type classes) is elegant, neat, etc., etc., but it is death to performance if left to linger in an inner loop.&quot;<br>
<br>
Regards,<br>
    Malcolm<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org">Libraries@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/libraries" target="_blank">http://www.haskell.org/mailman/listinfo/libraries</a><br>
</div></div></blockquote></div><br></div>