Re: [pypy-dev] Questions on the pypy+numpy project

2011-10-19 Thread Gary Robinson
 Jacob Hall?n, 18.10.2011 18:41:
 I'd just like to note that the compelling reason for PyPy to develop numpy
 support is popular demand. We did a survey last spring, in which an
 overwhelming number of people asked for numpy support. This indicates that
 there is a large group of people who will be reap benefits from using PyPy
 plus Numpy, without specific support for scipy packages.
 
 Depends on what the question was. Many people say NumPy, and when you ask 
 back, you find out that they actually meant SciPy or at least NumPy and 
 parts x, y and z of its ecosystem that I commonly use…

I was one of the people who responded to that poll, and I have to say that I 
fall into the category they actually meant 'SciPy'….  I assumed that there 
would be an interface to numpy that would also support scipy. SciPy has a lot 
of packages that run various things like SVD very, efficiently because it does 
them in C. I need access to those packages. I also write my own algorithms. For 
those, I want to benefit from PyPy's speed and don't necessarily want to make 
the algorithms fit into numpy's array-processing approach.

So, I NEED SciPy, and would like to also have PyPy, and I'd like to use them 
together rather than having to separate everything into separate scripts, some 
of which use CPython/SciPy and some of which use PyPy. In fact, my current code 
doesn't need NumPy at all except as the way to get to SciPy.

So, I have to say, I am unhappy with the current PyPy approach to NumPy. I'd 
rather see a much slower NumPy/PyPy integration if that meant being able to use 
SciPy seamlessly with PyPy.


-- 

Gary Robinson
CTO
Emergent Discovery, LLC
personal email: gary...@me.com
work email: grobin...@emergentdiscovery.com
Company: http://www.emergentdiscovery.com
Blog:http://www.garyrobinson.net




___
pypy-dev mailing list
pypy-dev@python.org
http://mail.python.org/mailman/listinfo/pypy-dev


Re: [pypy-dev] Questions on the pypy+numpy project

2011-10-19 Thread Gary Robinson
 You would like pypy+numpy+scipy so that you could write fast
 python-only algorithms and still use the existing libraries.  I
 suppose this is a perfectly reasonable usecase, and indeed
 the current plan does not focus on this.
 

Yes. That is exactly what I want.

 However, I'd like to underline that to write fast python-only algorithms, 
 you most probably still need a fast numpy in the way it is written right now 
 (unless you want to write your algorithms without using numpy at all)

I make very little use of numpy itself other than as the way to use scipy; I 
tend to write python-only algorithms that don't use numpy. As Peter Cock says 
in his own reply, a little bit of slowdown in regular numpy use compared to 
CPython would be fine, though a LOT of slowdown could be a problem.

Now, I'm not saying I'm typical. I have no idea how typical I am, though it 
sounds like Peter Cock is in a similar boat. I'm sure I'd benefit from doing 
more with numpy. But I simply cannot do without scipy, or accessing equivalent 
functionality by using R or another package. I'd much rather use scipy and see 
its capabilities grow than use R.

From my own bias, I'd assume that what would benefit the scientific community 
most is scipy integration first, and a faster numpy second. Scipy simply 
provides too many tools that are absolutely essential. 

The project for providing a common interface to IronPython, etc. sounded 
extremely promising in that regard -- it makes enormous sense to me that all 
different versions of python should have a way to access scipy, even if custom 
code that uses numpy is a little bit slower. My main concern is that the glue 
to frequently-called scipy functions such as scipy.stats.stats.chisqprob  
wouldn't be so much slower that my overall script isn't benefiting from PyPy.


Obviously, I understand that this is an open-source project and people develop 
what they are interested in. I'm just giving my individual perspective, for 
whatever it may be worth.



-- 

Gary Robinson
CTO
Emergent Discovery, LLC
personal email: gary...@me.com
work email: grobin...@emergentdiscovery.com
Company: http://www.emergentdiscovery.com
Blog:http://www.garyrobinson.net




On Oct 19, 2011, at 7:57 AM, Antonio Cuni wrote:

 On 19/10/11 13:42, Antonio Cuni wrote:
 
 I'm not sure to interpret your sentence correctly.
 Are you saying that you would still want a pypy+numpy+scipy, even if it ran
 things slower than CPython? May I ask why?
 
 ah sorry, I think I misunderstood your email.
 
 You would like pypy+numpy+scipy so that you could write fast python-only 
 algorithms and still use the existing libraries.  I suppose this is a 
 perfectly reasonable usecase, and indeed the current plan does not focus on 
 this.
 
 However, I'd like to underline that to write fast python-only algorithms, 
 you most probably still need a fast numpy in the way it is written right now 
 (unless you want to write your algorithms without using numpy at all).  If we 
 went to the slow-but-scipy-compatible approach, any pure python algorithm 
 which interfaces with numpy arrays would be terribly slow.
 
 ciao,
 Anto

___
pypy-dev mailing list
pypy-dev@python.org
http://mail.python.org/mailman/listinfo/pypy-dev