Our previous papers are dedicated to the development of the first code for computational astrophysics using Coarray Fortran technology. The main result of the study of the developed code is the achievement of weak scalability at the level of MPI implementations, which allows to fully concentrate on using Coarray Fortran for developing new program codes. Coarray Fortran is based on the MPI directives, and helps software developer to create simple code without Send/Receive or synchronization commands. At the same time, such scalability can be achieved due to the weak implementation of the sequential part of the program code, which is characterized by frequent cache misses, inefficient memory usage and poor overall performance. In this article, we propose a method for analyzing program code performance using the roofline analysis. We used Intel Advisor software package from Intel oneAPI toolkit. High performance and efficient work with the memory of both individual key procedures and the code as a whole are demonstrated.