Formula translation in Blitz++, NumPy and modern Fortran: A case study of the language choice tradeoffs

نویسندگان

  • Sylwester Arabas
  • Dorota Jarecka
  • Anna Jaruga
  • Maciej Fijalkowski
چکیده

Three object-oriented implementations of a prototype solver of the advection equation are introduced. The presented programs are based on Blitz++ (C++), NumPy (Python), and Fortran’s built-in array containers. The solvers include an implementation of the Multidimensional Positive-Definite Advective Transport Algorithm (MPDATA). The introduced codes exemplify how the application of object-oriented programming (OOP) techniques allows to reproduce the mathematical notation used in the literature within the program code. A discussion on the tradeoffs of the programming language choice is presented. The main angles of comparison are code brevity and syntax clarity (and hence maintainability and auditability) as well as performance. In the case of Python, a significant performance gain is observed when switching from the standard interpreter (CPython) to the PyPy implementation of Python. Entire source code of all three implementations is embedded in the text and is licensed under the terms of the GNU GPL license.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

The Relationship between Translation Tests and Reading Comprehension: A Case of Iranian University Students

The present study seeks to investigate the potentiality of the translation task as a testing method for measuring reading comprehension. To achieve this objective, two types of translation tests, open-ended and multiple-choice tests, and two types of reading comprehension tests, multiple-choice reading comprehension and open-ended cloze tests were developed in this study. The reliability of the...

متن کامل

A Survey on the Attitudes of Students Majoring in English Language towards the Teaching Methods in Translation Courses

As a subset of descriptive studies, the current research focused on learners’ perception of the common teaching methods in translation courses. Accordingly, a multi-item Likert-scale questionnaire with 29 items was developed based on the proposed strategies applied in the three traditional, complex and modern methods of teaching for collecting the research data. Cronbach’s alpha was administere...

متن کامل

Loss of the Socio-cultural Implicit Meanings in the English Translations of Mu’allaqat

Abstract Translation of literary texts, especially poetry, is one of the most difficult tasks; it requires mastery and knowledge of the language system and culture, and lack of this might lead to wrong translation. This study aimed to examine the loss and gain of the sociocultural implicit meanings in the English translations of the Mu’allaqat, and assess whether the translators of the Mu’allaq...

متن کامل

Loss of the Socio-cultural Implicit Meanings in the English Translations of Mu’allaqat

Abstract Translation of literary texts, especially poetry, is one of the most difficult tasks; it requires mastery and knowledge of the language system and culture, and lack of this might lead to wrong translation. This study aimed to examine the loss and gain of the sociocultural implicit meanings in the English translations of the Mu’allaqat, and assess whether the translators of the Mu’allaq...

متن کامل

Arrays in Blitz++

Numeric arrays in Blitz++ rival the eeciency of Fortran, but without any extensions to the C++ language. Blitz++ has features unavailable in Fortran 90/95, such as arbitrary transpose operations, array renaming, tensor notation, partial reductions, multicomponent arrays and stencil operators. The library handles parsing and analysis of array expressions on its own using the expression templates...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • Scientific Programming

دوره 22  شماره 

صفحات  -

تاریخ انتشار 2014