Prev: P4.7 Next: P4.9

P4.8: Gupta, Pramod
Pramod Gupta (Department of Astronomy, University of Washington)







Theme: Data Science: Workflows Hardware Software Humanware
Title: Computational Astrophysics with Go

Go is a relatively new open-source language from Google. It is a compiled language and so it is quite fast compared to interpreted languages. Moreover, the creators of the language focused on minimizing complexity. Hence, even though the language was not designed for scientific computing, its speed and simplicity make it quite attractive for scientific computing. In this paper, I discuss the suitability of Go for Computational Astrophysics based on using Go for Monte Carlo Radiative Transfer. The Go compiler has fast compile times and gives helpful error messages. Go has a standard code formatting tool gofmt so everyone's code looks the same. This makes it easier to read code written by others. The language has excellent documentation and a large number of built-in libraries. The run time performance is within a factor of two of an equivalent C, C++ or Fortran program. Go does memory management and run time checks such as array bounds checking which C, C++ and Fortran do not do. This increases the running time but it also increases the reliability of the code. Due to Go's newness and since it is not targeted at scientific computing, there are a limited number of scientific computing libraries. Hence, Go may not be a feasible choice for projects which depend on specialized libraries. However, for projects which are not dependent on such libraries, Go is an excellent language for Computational Astrophysics.

Link to PDF (may not be available yet): P4-8.pdf