On the performance of the Python programming language for serial and parallel scientific computations

  • Authors:
  • Xing Cai;Hans Petter Langtangen;Halvard Moe

  • Affiliations:
  • Simula Research Laboratory, P.O. Box 134, N-1325 Lysaker, Norway. E-mail: {xingca,hpl,hm}@simula.no and Department of Informatics, University of Oslo, P.O. Box 1080, Blindern, N-0316 Oslo, Norway;Simula Research Laboratory, P.O. Box 134, N-1325 Lysaker, Norway. E-mail: {xingca,hpl,hm}@simula.no and Department of Informatics, University of Oslo, P.O. Box 1080, Blindern, N-0316 Oslo, Norway;Simula Research Laboratory, P.O. Box 134, N-1325 Lysaker, Norway. E-mail: {xingca,hpl,hm}@simula.no

  • Venue:
  • Scientific Programming
  • Year:
  • 2005

Quantified Score

Hi-index 0.00

Visualization

Abstract

This article addresses the performance of scientific applications that use the Python programming language. First, we investigate several techniques for improving the computational efficiency of serial Python codes. Then, we discuss the basic programming techniques in Python for parallelizing serial scientific applications. It is shown that an efficient implementation of the array-related operations is essential for achieving good parallel performance, as for the serial case. Once the array-related operations are efficiently implemented, probably using a mixed-language implementation, good serial and parallel performance become achievable. This is confirmed by a set of numerical experiments. Python is also shown to be well suited for writing high-level parallel programs.