The high performance of nowadays programs (including numerical algebra packages) is achieved by explicit loop restructuring (mainly loop blocking). These transformations result in better temporal and spatial locality. In this paper, we introduce some basic techniques for improving the performance of programs. Then, we describe source code transformations based on loop reversal and loop for the SESOL (as an example of a mathematic modelling tool) code. We have concentrated on nowadays IBM processor's architecture with L1 and L2 caches. Our optimizations results in the significant performance improvement.