NumPy Performance Debate

Comments discuss NumPy's performance in Python numerical computing, emphasizing its C implementation for near-native speeds, and compare it to alternatives like Julia, Numba, Cython, or native C/C++ for optimization.

📉 Falling 0.3x Programming Languages
2,335
Comments
20
Years Active
5
Top Authors
#8193
Topic ID

Activity Over Time

2007
1
2008
11
2009
16
2010
36
2011
62
2012
83
2013
122
2014
90
2015
147
2016
139
2017
181
2018
113
2019
136
2020
203
2021
207
2022
225
2023
245
2024
200
2025
108
2026
10

Keywords

e.g CPU JIT NumPy GB PR MatLab MB IMO MRCIEU numpy python code native fast library libraries language mathematica slower

Sample Comments

adamnemecek Oct 20, 2020 View on HN

Because julia is a better language. Numpy is written in C, why use python when you can use C?

hesselink May 13, 2014 View on HN

Isn't a lot of numpy implemented in C?

npalli Jun 21, 2025 View on HN

Very cool, examples look great. Any performance metrics (compared to NumPy) that are available?

wombatpm Aug 8, 2019 View on HN

Isn't using numpy just an example of custom C code for a python bottleneck?

wyldfire Dec 18, 2021 View on HN

At first I thought, "how could anything be slower than python?" And then I figured that you probably would've ported it to leverage things like numpy which makes a lot of operations into native code and takes advantage of highly optimized blas libs, etc.

jacquesm Dec 27, 2022 View on HN

NumPy is insanely fast for most use cases, I've (grudgingly) come to the conclusion that if NumPy doesn't hack it then I should re-think the problem or my way of solving it rather than to try to optimize that particular bit of code if it isn't meant for something that is going to be run in production on a large number of machines. Likely there are better uses of my time. It's interesting how what is nominally a scripting language can perform so well for compute intensi

vasilipupkin Sep 22, 2023 View on HN

why not just use numpy which is already in C?

nerdponx Aug 29, 2016 View on HN

What does this do that I can't already do with some combination of Numpy, Cython, and Numba?

davidgrenier Jul 13, 2023 View on HN

But isn't what makes numpy efficient written in C?

joshuaellinger Sep 18, 2020 View on HN

Take a look at Numba for JIT.The primary drawback of Numpy alone is that you pay the memory-to-cache latency for every operation. Numba compiles into C on the fly. It makes Python fast when it matters.