Timing
De WikiLICC
Testando vetorização:
- Maior problema alocável: 154Mb * 3*4 = 1.8Gb
! http://goparallel.sourceforge.net/optimizing-loops-vectorization/ program Vectorization use portlib real(4),dimension(:),allocatable :: x,y,z integer :: len=154*1024*1024 ! 154 Mb real(4) :: timing allocate( x(len) ,stat=ierr) allocate( y(len) ,stat=ierr) allocate( z(len) ,stat=ierr) do j=1,10 timing = secnds(0.0) do i=1,len z(i)=sqrt(x(i))+sqrt(y(i)) end do timing = secnds(timing)*1000 print *,' Timing =',timing,'/1000 s' end do end program
- Resultados
Memory 1.8 Gb Debug (no optimization) (32bits) 2.19 s Debug (no optimization) (64bits) 2.06 s Optimization 0.11 s