NumPy's arrays are more compact than Python lists -- a list of lists as you describe, in Python, would take at least 20 MB or so, while a NumPy 3D array with single-precision floats in the cells would fit in 4 MB. Access in reading and writing items is also faster with NumPy.

Maybe you don't care that much for just a million cells, but you definitely would for a billion cells -- neither approach would fit in a 32-bit architecture, but with 64-bit builds NumPy would get away with 4 GB or so, Python alone would need at least about 12 GB (lots of pointers which double in size) -- a much costlier piece of hardware!

The difference is mostly due to "indirectness" -- a Python list is an array of pointers to Python objects, at least 4 bytes per pointer plus 16 bytes for even the smallest Python object (4 for type pointer, 4 for reference count, 4 for value -- and the memory allocators rounds up to 16). A NumPy array is an array of uniform values -- single-precision numbers takes 4 bytes each, double-precision ones, 8 bytes. Less flexible, but you pay substantially for the flexibility of standard Python lists!

Answer from Alex Martelli on Stack Overflow
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-lists-vs-numpy-arrays
Python Lists VS Numpy Arrays - GeeksforGeeks
Functionality: Lists can store any data type, but lack specialized NumPy functions for numerical operations. Homogeneous Data: NumPy arrays store elements of the same data type, making them more compact and memory-efficient than lists.
Published: July 12, 2025
🌐
Reddit
reddit.com › r/python › is it ever advantageous to use a standard python list vs a numpy array when all elements are the same type?
r/Python on Reddit: Is it ever advantageous to use a standard Python list vs a numpy array when all elements are the same type?
December 8, 2020 -

I'm wondering if there is a use case where lists are better than numpy arrays besides storing multiple types of data in a relatively small/low dimension list (say i just want a quick-and-dirty list to store some constants i want to call on later?

I'm not well versed enough in how processors/memory work to know if I'm missing something else obvious. I know it won't make a huge performance impact anyways if you don't actually have a lot of math or large lists/arrays to work with, but I've been diving deeper into how numpy/pandas function at a basic level and it got me thinking about this.

Discussions

Is it ever advantageous to use a standard Python list vs a numpy array when all elements are the same type?
very often it is more efficient to use a list of numpy arrays than a higher dimensional (3D, 4D, ...) array. E.g., if you are computing polynomials, storing the terms in a list of arrays will be approximately sqrt(n_terms) faster than an nd array with the term # on the first dimension. The numpy allocator is relatively better at many small arrays than it is a few jumbo ones. More on reddit.com
🌐 r/Python
13
4
December 8, 2020
Numpy array vs list
I can't figure out what the difference is between a Numpy array and a normal list. More on reddit.com
🌐 r/Python
8
0
November 3, 2017
Why is NumPy Much Faster Than Lists?
List are a contiguous array of PyObjects each of which points to the underlying data. A NumPy array is a contiguous array of the data itself. So NumPy doesn’t have to chase pointers to get to the actual data. Take a look at this page for more details: https://jakevdp.github.io/PythonDataScienceHandbook/02.01-understanding-data-types.html More on reddit.com
🌐 r/Numpy
5
3
May 23, 2024
Differences in terms of performance between list, set, and numpy arrays?
Accessing a single element in a list is 5x faster than accessing a single element in a numpy array, 22.1 ns rather than 123 ns on my pc. Lists are better for single-element operations. A one-million-element multiplication operation on a numpy array is 50x faster than the similar list-comprehension operation, 1.28 ms rather than 64.2 ms. Numpy arrays are better for array operations. (These figures are copied from a test I did about 5 years ago, i.e. before the Faster CPython project, but should still be mostly relevant. The ipython %%timeit has its setup on the first line and times the second line.) In [2]: %%timeit mylist = [1,2,3] ...: x = mylist[1] ...: 22.1 ns ± 0.0626 ns per loop (mean ± std. dev. of 7 runs, 10000000 loops each) In [3]: %%timeit import numpy; myarray = numpy.array([1,2,3]) ...: x = myarray[1] ...: 123 ns ± 0.0508 ns per loop (mean ± std. dev. of 7 runs, 10000000 loops each) In [4]: %%timeit mylist = list(range(1000000)) ...: newlist = list(n*2 for n in mylist) ...: 64.2 ms ± 704 µs per loop (mean ± std. dev. of 7 runs, 10 loops each) In [5]: %%timeit import numpy; myarray = numpy.arange(1000000) ...: newarray = myarray * 2 ...: 1.28 ms ± 1.43 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each) More on reddit.com
🌐 r/learnpython
6
6
May 12, 2024
Top answer
1 of 8
838

NumPy's arrays are more compact than Python lists -- a list of lists as you describe, in Python, would take at least 20 MB or so, while a NumPy 3D array with single-precision floats in the cells would fit in 4 MB. Access in reading and writing items is also faster with NumPy.

Maybe you don't care that much for just a million cells, but you definitely would for a billion cells -- neither approach would fit in a 32-bit architecture, but with 64-bit builds NumPy would get away with 4 GB or so, Python alone would need at least about 12 GB (lots of pointers which double in size) -- a much costlier piece of hardware!

The difference is mostly due to "indirectness" -- a Python list is an array of pointers to Python objects, at least 4 bytes per pointer plus 16 bytes for even the smallest Python object (4 for type pointer, 4 for reference count, 4 for value -- and the memory allocators rounds up to 16). A NumPy array is an array of uniform values -- single-precision numbers takes 4 bytes each, double-precision ones, 8 bytes. Less flexible, but you pay substantially for the flexibility of standard Python lists!

2 of 8
270

NumPy is not just more efficient; it is also more convenient. You get a lot of vector and matrix operations for free, which sometimes allow one to avoid unnecessary work. And they are also efficiently implemented.

For example, you could read your cube directly from a file into an array:

x = numpy.fromfile(file=open("data"), dtype=float).reshape((100, 100, 100))

Sum along the second dimension:

s = x.sum(axis=1)

Find which cells are above a threshold:

(x > 0.5).nonzero()

Remove every even-indexed slice along the third dimension:

x[:, :, ::2]

Also, many useful libraries work with NumPy arrays. For example, statistical analysis and visualization libraries.

Even if you don't have performance problems, learning NumPy is worth the effort.

🌐
Enki
enki.com › post › lists-vs-arrays-in-python
Enki | Blog - Lists vs Arrays in Python
Lists are quick with appending or popping elements at the end. However, inserting or deleting elements from elsewhere involves shifting, which can be slow. NumPy arrays are tailored for numerical operations.
🌐
Towards Data Science
towardsdatascience.com › home › data science › python lists vs. numpy arrays: a deep dive into memory layout and performance benefits
Python Lists Vs. NumPy Arrays: A Deep Dive into Memory Layout and Performance Benefits | Towards Data Science
July 14, 2023 - Since the items are all grouped by category, you can quickly find a book without having to search through many boxes. This is why NumPy arrays are faster than native Python lists in many operations.
🌐
TechVidvan
techvidvan.com › tutorials › python-lists-vs-numpy-arrays
Python Lists VS Numpy Arrays - TechVidvan
October 24, 2024 - The homogeneous composition of NumPy arrays ensures that all their components possess a uniform data type, rendering them ideally suited for numerical calculations. Furthermore, they support operations performed at an individual element level and offer an extensive array of functions, methods, and variables tailored specifically for matrix computations. They also facilitate stored data contiguously in memory, thereby enhancing the pace of data access. Conversely, Python Lists offer dynamism and adaptability similar to arrays that dynamically expand in other programming languages.
Find elsewhere
🌐
Medium
medium.com › @vakgul › numpy-vs-traditional-python-lists-a-performance-showdown-1e8bebc55933
Numpy vs Traditional Python Lists: A Performance Showdown | by veyak | Medium
June 13, 2023 - These examples demonstrate the power of Numpy arrays in terms of memory efficiency and computation speed. While Python’s built-in lists are great for a variety of tasks, when it comes to numerical computation on large datasets, Numpy reigns supreme.
🌐
YouTube
youtube.com › watch
NumPy Array vs Python List - YouTube
This video compare and contrasts NumPy Array with Python ListsThis video is a part of a course called Python Data Manipulation, you can see the sequence of t...
Published: April 22, 2022
🌐
LinkedIn
linkedin.com › pulse › python-lists-vs-numpy-arrays-mohamed-hamdy-b5e9f
Python Lists vs NumPy Arrays
Login to LinkedIn to keep in touch with people you know, share ideas, and build your career.
🌐
Medium
medium.com › @snehauniyal2003 › numpy-vs-python-lists-which-is-faster-and-why-ee98ecfee87f
NumPy vs Python Lists: Which Is Faster and Why | by sneha uniyal | Medium
July 18, 2025 - Each element in a list is a separate Python object stored somewhere else in memory, making element access slower and less predictable. So, if you’re working with large datasets or doing number-heavy operations — whether it’s machine learning, image processing, or scientific computation — NumPy arrays are not just better; they’re essential.
🌐
W3Schools
w3schools.com › python › numpy › numpy_data_types.asp
NumPy Data Types
We use the array() function to create arrays, this function can take an optional argument: dtype that allows us to define the expected data type of the array elements: ... import numpy as np arr = np.array([1, 2, 3, 4], dtype='S') print(arr) print(arr.dtype) Try it Yourself »
🌐
Toronto
cave.cs.toronto.edu › kriz › cifar.html
CIFAR-10 and CIFAR-100 datasets
data -- a 10000x3072 numpy array of uint8s. Each row of the array stores a 32x32 colour image. The first 1024 entries contain the red channel values, the next 1024 the green, and the final 1024 the blue. The image is stored in row-major order, so that the first 32 entries of the array are the red channel values of the first row of the image. labels -- a list ...
🌐
Wikipedia
en.wikipedia.org › wiki › Comparison_of_programming_languages_(array)
Comparison of programming languages (array) - Wikipedia
August 17, 2026 - ↑ The standard Python array type, list, does not support vectorized operations as defined here. However, the numpy extension adds array objects with this ability
🌐
InterviewBit
interviewbit.com › python-interview-questions
120+ Top Python Interview Questions and Answers (2026) - InterviewBit
Additionally, as the size of the NumPy arrays increases, NumPy becomes around 30x times faster than the Python List. This is because the Numpy arrays are densely packed in the memory due to their homogenous nature.
Published: January 24, 2026
🌐
Pandas
pandas.pydata.org › pandas-docs › stable › user_guide › indexing.html
Indexing and selecting data — pandas 3.1.0 documentation
By default, each row has an equal probability of being selected, but if you want rows to have different probabilities, you can pass the sample function sampling weights as weights. These weights can be a list, a NumPy array, or a Series, but they must be of the same length as the object you are sampling.
🌐
Polars
docs.pola.rs › py-polars › html › reference › api › polars.concat.html
polars.concat — Polars documentation
Combine multiple DataFrames, LazyFrames, or Series into a single object · DataFrames, LazyFrames, or Series to concatenate
🌐
Note.nkmk.me
note.nkmk.me › home › python
List vs. Array vs. numpy.ndarray in Python | note.nkmk.me
February 5, 2024 - Although array provides strict memory management by restricting elements to a single type, list is often preferred for general-purpose applications without specific memory constraints.
🌐
Data Leads Future
dataleadsfuture.com › python-lists-vs-numpy-arrays-a-deep-dive-into-memory-layout-and-performance-benefits
Python Lists Vs. NumPy Arrays: A Deep Dive into Memory Layout and Performance Benefits
December 19, 2025 - Since the items are all grouped by category, you can quickly find a book without having to search through many boxes. This is why NumPy arrays are faster than native Python lists in many operations.
🌐
Quora
quora.com › Is-it-ever-optimal-to-use-a-Python-list-versus-a-numpy-array
Is it ever optimal to use a Python list versus a numpy array? - Quora
Answer (1 of 2): Yes. For example You want to hold an ordered collection of objects - a Python list is excellent for this - to the best of my knowledge a numpy array is for numbers only. You want to hold an ordered collection which is dynamic in terms of the number of objects it can hold, and ...