<br><br><div class="gmail_quote">On Sun, Oct 16, 2011 at 11:50 AM, Maciej Fijalkowski <span dir="ltr">&lt;<a href="mailto:fijall@gmail.com">fijall@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
On Sun, Oct 16, 2011 at 2:29 PM, Stefan Behnel &lt;<a href="mailto:stefan_ml@behnel.de">stefan_ml@behnel.de</a>&gt; wrote<br>
<div class="im">&gt; Samuel Vaiter, 14.10.2011 17:59:<br>
&gt;&gt;<br>
&gt;&gt; The main<br>
&gt;&gt; reason why Numpy is my main interest is that as Ph.D student in<br>
&gt;&gt; Applied Mathematics, I really hope one day we will be able to perform<br>
&gt;&gt; numerical computation without using heavy binding in C/Fortran or<br>
&gt;&gt; intermediate solution like Cython.<br>
&gt;<br>
&gt; I guess you didn&#39;t mean it that way, but &quot;intermediate solution&quot; makes it<br>
&gt; sound like you expect any of these to go away one day. They sure won&#39;t.<br>
&gt; Manually optimised C and Fortran code will always beat JIT compilers,<br>
&gt; especially in numerics. It&#39;s a game they can&#39;t win - whenever JIT compilers<br>
&gt; get too close to hand optimised code, someone will come along and write<br>
&gt; better code.<br>
&gt;<br>
&gt; Stefan<br>
<br>
</div>I guess what you say is at best [citation needed]. We have proven<br>
already that we can perform several optimizations that are very hard<br>
to perform at the C level. And indeed, while you can always argue<br>
&quot;well, you can just write a better compiler&quot;, it&#39;s true also for JITs.<br>
And we&#39;re only at the beginning of what we can do.<br>
<br>
One example that I have in mind is array expressions that depend on<br>
runtime - we can optimize them fairly well in the JIT (which means SSE<br>
and whatnot), but you just can&#39;t get the same thing in C, because<br>
you&#39;re unable to compile native code per a set of array operations.<br>
<br>
Cheers,<br>
fijal<br>
<div><div></div><div class="h5">_______________________________________________<br>
pypy-dev mailing list<br>
<a href="mailto:pypy-dev@python.org">pypy-dev@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/pypy-dev" target="_blank">http://mail.python.org/mailman/listinfo/pypy-dev</a><br>
</div></div></blockquote></div><br>Another example, which no fortran compiler will ever be able to do, is if you create a ufunc from a Python function, you can still inline it into assembler that&#39;s emitted for an operation so:<div>
<br></div><div>a + b * sin(my_ufunc(c))</div><div><br></div><div>still generates a single loop in assembler.</div><div><br></div><div>Alex<br clear="all"><div><br></div>-- <br>&quot;I disapprove of what you say, but I will defend to the death your right to say it.&quot; -- Evelyn Beatrice Hall (summarizing Voltaire)<br>
&quot;The people&#39;s good is the highest law.&quot; -- Cicero<br><br>
</div>