<br><br><div class="gmail_quote">On Thu, Dec 16, 2010 at 2:20 PM, 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;">
<div><div></div><div class="h5">On Thu, Dec 16, 2010 at 11:16 AM, Armin Rigo &lt;<a href="mailto:arigo@tunes.org">arigo@tunes.org</a>&gt; wrote:<br>
&gt; Hi,<br>
&gt;<br>
&gt; On Wed, Dec 15, 2010 at 6:21 PM, René Dudfield &lt;<a href="mailto:renesd@gmail.com">renesd@gmail.com</a>&gt; wrote:<br>
&gt;&gt;&gt; Is pypy suitable for writing interpretor of vectorized language like<br>
&gt;&gt;&gt; Matlab, R etc which vector and matrix are first class objects? This includes<br>
&gt;&gt;&gt; matrix shape inference, and efficient linear algebra code generation.<br>
&gt;&gt;<br>
&gt;&gt; have you seen numpy/scipy?<br>
&gt;<br>
&gt; The first aspect is simply if RPython would be suitable for writing an<br>
&gt; interpreter for, say, Matlab.  The answer is &quot;probably yes&quot;: PyPy<br>
&gt; would be suitable for such dynamic languages, giving you a JIT<br>
&gt; compiler for free.  I don&#39;t really know how complex the core of these<br>
&gt; languages are, but I suspect not too much.<br>
&gt;<br>
&gt; Of course you are then going to hit the same problems that Ademan<br>
&gt; tries to solve for numpy/scipy, notably how to implement at least the<br>
&gt; basic linear algebra operations in such a way that the JIT can improve<br>
&gt; them.  There are various goals there, e.g. to turn Python (or Matlab)<br>
&gt; code like A+B+C, adding three matrices together, into one matrix<br>
&gt; operation instead of two (as it is now: (A+B)+C).  This is all a bit<br>
&gt; experimental so far.<br>
&gt;<br>
&gt;<br>
&gt; A bientôt,<br>
&gt;<br>
&gt; Armin.<br>
<br>
</div></div>Regarding this - I was thinking about haveing a + b - c create a<br>
bytecode that would be executed using small interpreter with a<br>
jit-merge-point and a hint &quot;can be vectorized&quot;.<br>
<div><div></div><div class="h5">_______________________________________________<br>
<a href="mailto:pypy-dev@codespeak.net">pypy-dev@codespeak.net</a><br>
<a href="http://codespeak.net/mailman/listinfo/pypy-dev" target="_blank">http://codespeak.net/mailman/listinfo/pypy-dev</a></div></div></blockquote></div><br>That seems like a pretty big special case, why not work at the larger idea of cross-loop optimizations?<div>
<br></div><div>Alex<br clear="all"><br>-- <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>
&quot;Code can always be simpler than you think, but never as simple as you want&quot; -- Me<br>
</div>