Quantcast
Channel: Fortran
Viewing all articles
Browse latest Browse all 3108

integer(1) and performance issue

$
0
0

Hi,

In order to conserve memory, I intent to use integer(1)  instead of the standard integer(4) for one of my variables in the derived type.

type cell

    logical :: check

    integer(1) :: types

    

    real(8) :: vol,...

end type cell

My types variable will only have values from 0 to 2. Hence I intent to use integer(1)  instead of the standard integer(4).

Will it give any performance issue such as slowing down of the code?

I read below that if using integer(2): "Using this feature may have adverse performance implications, and we do not recommend it. "

http://docs.oracle.com/cd/E19957-01/805-4939/z40007365fe9/index.html.

I wonder integer(1) also will get this problem.

Thanks!

 

 

 

 



 


Viewing all articles
Browse latest Browse all 3108

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>