Particle transport simulation is widely used in astrophysics,biomedicine and other fields,but this kind of program has the problem that it needs long simulation time.In this paper,the performance bottleneck analysis and the optimization research of software and hardware for the Monte Carlo particle transport program represented by XSBench are carried out.The main contributions are as follows:Firstly,the data structure and transport simulation model of XSBench are systematically studied,the existing software and hardware optimization methods are analyzed,and the space for improvement is found.It is found that most of the current software optimization methods of the program are parallel processing,and there are still deficiencies in the analysis of program performance bottlenecks.The types of hardware optimization methods are few and the effect is general.There is still room to improve the performance of XSBench.Secondly,through quantitative analysis of XSBench behavior,performance bottlenecks are positioned in irregular memory access caused by binary lookup process and two-dimensional array access.A software data prefetching technology for irregular memory access of XSBench is proposed,which makes the single-thread performance of nuclide grid is accelerated by 59.3%~61%,and the performance of 16 threads is accelerated by 34.4%~35.3%;the single-thread performance of unionized energy grid is accelerated by 32.1%~38.8%,and the performance of 16 threads is accelerated by29.5%~30.7%;the single-thread performance of logarithmic hash grid is accelerated by15.5%~18.3%,and the performance of 16 threads is accelerated by 13.36%~14.5%.Finally,by exploring the access rules of the binary search process,a binary search data prefetcher named BSP is proposed.By judging the conditions by which the prefetch occurs and obtaining a more accurate prefetch address,the performance of the nuclide grid is improved by 87.1% compared to the Champ Sim benchmark configuration.By analyzing the performance bottleneck of XSBench,this paper puts forward the corresponding software and hardware optimization method,and puts forward a practical solution and optimization strategy for the acceleration of Monte Carlo particle transport simulation,which has a reference significance and value for scientific and engineering calculation. |