Matrix Computations in Basic on a Microcomputer

Higham, Nicholas J. (2013) Matrix Computations in Basic on a Microcomputer. [MIMS Preprint]

[thumbnail of Binder1.pdf] PDF

Download (15MB)


We consider the efficient implementation of matrix computations in interpreted Basic on a microcomputer. Linear equations routines SGEFA and SGESL from the LINPACK library of Fortran programs are translated into Basic and run on four microcomputers: the Commodore 64, the Amstrad CPC 464, the BBC Microcomputer, and the BBC with a Z-80 second processor. The computational cost of the routines is found to be dominated by subscripting calculations rather than by floating point arithmetic. For the BBC Microcomputer and the Commodore 64, the BLAS routines which constitute the inner loops of SGEFA and SGESL are coded in assembly language; speed increases of factors 2.8 (BBC) and 5.3 (Commodore 64) accrue, and the improved execution times are comparable to ones which have been quoted for the more powerful and expensive IBM PC running under a Fortran compiler. The computational cost of the routines using coded BLAS is found to be dominated by floating point arithmetic, subscripting calculations and other overheads having been reduced to a negligible level, and it is concluded that these hybrid Basic/assembly language routines extract near optimum performance from their host machines. Our findings are shown to be applicable to any matrix routine whose computational cost can be measured in "flops".

Item Type: MIMS Preprint
Additional Information: This EPrint is a reissue of the 1985 technical report of the same title. It should be cited as "Nicholas J. Higham. Matrix computations in Basic on a microcomputer. Numerical Analysis Report No. 101, University of Manchester, Manchester, UK, June 1985. Reissued as MIMS EPrint 2013.51, Manchester Institute for Mathematical Sciences, The University of Manchester, UK, October 2013."
Uncontrolled Keywords: matrix computations, Basic, microcomputer, interpreter, assembly language, LINPACK, BLAS
Subjects: MSC 2010, the AMS's Mathematics Subject Classification > 15 Linear and multilinear algebra; matrix theory
MSC 2010, the AMS's Mathematics Subject Classification > 65 Numerical analysis
Depositing User: Nick Higham
Date Deposited: 16 Oct 2013
Last Modified: 08 Nov 2017 18:18

Actions (login required)

View Item View Item