is c faster?

Chris Barker chrishbarker at home.net
Mon Jun 11 19:15:01 EDT 2001


Alex Martelli wrote:
>  a speed up as small as 20% 

That must have been disapointing!

> it's possible) and as big as 1,000%, i.e., 10 times faster (again,
> I haven't seen anything more than that on real code, although in

I got an approx 100X speedup in my only substantial extension (still not
that big). I was already using NumPy arrays, but there was just no way
to "vectorize" the whole thing. I may have been able to get a 10X
speed-up or so keeping it in just Python if I put some time into it, but
I knew I wasn't going to get what I needed, so I went to C.

If only there was a Py2C that knew about NumPy arrays, I wouldn't have
had to write that darn C code at all!

-Chris

-- 
Christopher Barker,
Ph.D.                                                           
ChrisHBarker at home.net                 ---           ---           ---
http://members.home.net/barkerlohmann ---@@       -----@@       -----@@
                                   ------@@@     ------@@@     ------@@@
Oil Spill Modeling                ------   @    ------   @   ------   @
Water Resources Engineering       -------      ---------     --------    
Coastal and Fluvial Hydrodynamics --------------------------------------
------------------------------------------------------------------------



More information about the Python-list mailing list