NumPy: por qué un bucle de Python es caro

Python es un lenguaje lento para trabajos numéricos. Cada iteración del bucle: el intérprete verifica los tipos, encuentra objetos en la memoria, ejecuta una operación y devuelve un nuevo objeto. En un millón de elementos eso son cientos de milisegundos. NumPy hace lo mismo en milisegundos, porque bajo el capó está compilado en C trabajando en un bloque contiguo de memoria escrita.

Full content is available with a subscription.
Get full access to all courses on the platform for one year with a single payment.
Unlike other platforms that charge per course, here you get everything for one price, and after one year of use there will be no automatic charge for the following year.