Skip to main content

Code Optimization

  • Chapter
  • First Online:
Numerical Python
  • 11k Accesses

Abstract

In this book we have explored various topics of scientific and technical computing using Python and its ecosystem of libraries. As touched upon in the very first chapter of this book, the Python environment for scientific computing generally strikes a good balance between a high-level environment that is suitable for exploratory computing and rapid prototyping – which minimizes development efforts – and high-performance numerics – which minimize application run times. High-performance numerics is achieved not through the Python language itself, but rather through leveraging libraries that contain or use external compiled code, typically written in C or in Fortran. Because of this, in computing applications that rely heavily on libraries such as NumPy and SciPy, most of the number crunching is performed by compiled code, and the performance is therefore vastly better than if the same computation were to be implemented purely in Python.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    http://cffi.readthedocs.org .

  2. 2.

    http://docs.scipy.org/doc/numpy-dev/f2py/index.html .

  3. 3.

    The producers of the Anaconda Python environment, see Chapter 1 and Appendix 1.

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2015 Robert Johansson

About this chapter

Cite this chapter

Johansson, R. (2015). Code Optimization. In: Numerical Python. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-0553-2_19

Download citation

Publish with us

Policies and ethics