On Sat, 26 Feb 2022 at 09:58, Richard Damon <rich...@damon-family.org> wrote: > > On 2/25/22 2:47 PM, Chris Angelico wrote: > > On Sat, 26 Feb 2022 at 05:49, Richard Damon <rich...@damon-family.org> > > wrote: > >> On 2/25/22 4:12 AM, BELAHCENE Abdelkader wrote: > >>> 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. > >>> > >> My understanding is that numpy is written in C, so for it to be faster > >> than C, you are saying that C is faster that C. > > Fortran actually, but ultimately, they both get compiled to machine code. > > Looking at the Github repo I see: > > Languages: > Python. 62.5% > C 35.3% > C++. 1.0% > Cython. 0.9% > Shell. 0.2% > Fortran. 0.1% > > So there is a bit of Fortan in there, but it looks like most of the > heavy lifting is in C. > > My guess is the Fortran is likely some hooks to add Fortran modules into > the program with numpy. >
GitHub's analysis isn't always very meaningful. I think it's pretty clear that Numpy isn't implemented in Python :) In any case, point is that the implementation language is mostly irrelevant. ChrisA -- https://mail.python.org/mailman/listinfo/python-list