Re: [python-uk] C is it faster than numpy

2022-02-25 Thread Michael
Hi, On Fri, 25 Feb 2022 at 16:22, BELAHCENE Abdelkader < abdelkader.belahc...@enst.dz> wrote: > Hi, > What do you mean? > the python and C programs are not equivalent? > > The python and C programs are NOT equivalent. (surface level they are: they both calculate the triangular number of N, N

Re: [python-uk] C is it faster than numpy

2022-02-25 Thread BELAHCENE Abdelkader
Thanks, But the different is very significant!!! so? Le ven. 25 févr. 2022 à 10:58, Edward Hartley a écrit : > > Hi, > Simply check the original Numpy aka Numerical Python docs where it’s > comprehensively explained that the library is implemented in C with a thin > Python wrapper. The docs

Re: [python-uk] C is it faster than numpy

2022-02-25 Thread BELAHCENE Abdelkader
Hi, What do you mean? the python and C programs are not equivalent? Le ven. 25 févr. 2022 à 10:42, Giorgio Zoppi a écrit : > Well, > numpy is written in C :) Maybe your C is not the numpy equivalent? > Best Regards, > Giorgio > > Il giorno ven 25 feb 2022 alle ore 09:03 BELAHCENE Abdelkader <

Re: [python-uk] C is it faster than numpy

2022-02-25 Thread Stestagg
This is a fascinating subject. Firstly: a lot of people think that C (or C++) is faster than python, yes I agree, > if you look at raw execution speed, then this is absolutely correct. The reasons for this are many and complex, but people who use this as a standalone reason to avoid Python

Re: [python-uk] C is it faster than numpy

2022-02-25 Thread Adam Johnson via python-uk
Also interestingly, you can see the language breakdown on the right hand side of https://github.com/numpy/numpy/ : Python 62.5% C 35.3% C++ 1.0% Cython 0.9% Shell 0.2% Fortran 0.1% Much of the Python code is tests. On Fri, Feb 25, 2022 at 9:57 AM Edward Hartley wrote: > > Hi, > Simply check

Re: [python-uk] C is it faster than numpy

2022-02-25 Thread Edward Hartley
Hi, Simply check the original Numpy aka Numerical Python docs where it’s comprehensively explained that the library is implemented in C with a thin Python wrapper. The docs were written circa ‘98 by the original library author. The library was optimised over a long period before being

Re: [python-uk] C is it faster than numpy

2022-02-25 Thread Martin
Yeah it uses BLAS, you can read about it here https://markus-beuckelmann.de/blog/boosting-numpy-blas.html On Fri, 25 Feb 2022, 09:54 SW, wrote: > I think it uses fortran (or used to?) but yes, still close to the metal. > > Thanks, > S > > On 25/02/2022 10:41, Giorgio Zoppi wrote: > > Well, >

Re: [python-uk] C is it faster than numpy

2022-02-25 Thread SW
I think it uses fortran (or used to?) but yes, still close to the metal. Thanks, S On 25/02/2022 10:41, Giorgio Zoppi wrote: Well, numpy is written in C :) Maybe your C is not the numpy equivalent? Best Regards, Giorgio Il giorno ven 25 feb 2022 alle ore 09:03 BELAHCENE Abdelkader ha

Re: [python-uk] C is it faster than numpy

2022-02-25 Thread Giorgio Zoppi
Well, numpy is written in C :) Maybe your C is not the numpy equivalent? Best Regards, Giorgio Il giorno ven 25 feb 2022 alle ore 09:03 BELAHCENE Abdelkader < abdelkader.belahc...@enst.dz> ha scritto: > Hi, > a lot of people think that C (or C++) is faster than python, yes I agree, > but I think

[python-uk] C is it faster than numpy

2022-02-25 Thread BELAHCENE Abdelkader
Hi, a lot of people think that C (or C++) is faster than python, yes I agree, but I think that's not the case with numpy, I believe numpy is faster than C, at least in some cases. *Is there another explanation ?Or where can find a doc speaking about the subject?*Thanks a lot Regards Numpy