BIG INTEGER DATA TYPES - USAGE AND PERFORMANCE COMPARISON

M. Mikac , R. Logožar, M. Horvatić, E. Dumić 

University North (CROATIA)
Students in STEM fields often need to propose and develop programming solutions of different levels of complexity, for various scientific, technical, and engineering problems. In order to solve such tasks, they must have sufficient general programming skills and the knowledge of some standard programming language, such as C/C++, C#, Python, Java, Kotlin, JavaScript, Pascal. Alternatively, specialized programming languages and computing tools such as Matlab, Scilab, or GNU Octave, may be better suited for solving some of the problems and could sometimes be considered as a first choice.

In this paper, the authors discuss the use of the nonstandard integer data types, so-called big integers, being able to store and handle large integer values that can be only represented with more than 64 bits. They analyse the possibilities of using those data types in education and programming practice for the well-known general-purpose languages: C/C++, C#, Java, JavaScript, Kotlin, and Pascal, as well as for the specialized high-level programming tools like free Matlab alternatives - Scilab and GNU Octave. For the languages without direct support for the big integers, the authors examine the possibility of inclusion of the freely available libraries, which include such types. After that, they measure and analyse the performance of the calculations with the big integer types on the standard Windows based, computing platform by using the fast-growing benchmark functions, such as factorials. The obtained results are presented, discussed, and compared.