codee-com / open-catalog

A collaborative effort to consolidate expert knowledge on code guidelines for the correctness, modernization, and optimization of code written in C, C++, and Fortran programming languages
https://open-catalog.codee.com/
Apache License 2.0
83 stars 9 forks source link

Add PWR071: Prefer real(kind=kind_value) for declaring consistent floating types #17

Closed alvrogd closed 5 months ago

alvrogd commented 5 months ago

Add entry and benchmark for a new Fortran-specific checker. My results:

$ gfortran --version                
GNU Fortran (Debian 12.2.0-14) 12.2.0
------------------------------------------------------------------
Benchmark                        Time             CPU   Iterations
------------------------------------------------------------------
PWR071 Fortran Example        3480 us         3480 us          201
PWR071 Fortran Improved       3482 us         3482 us          201

As can be seen, the recommended code modernization does not incur any performance downgrade.