- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Dear all,
I have a very simple question. If I have two vector, let's say AA(:) and BB(:), what is between the following options the faster one?
DO i=1,SIZE(AA)
AA(i)=BB(i)
ENDDO
or
AA(:) = BB(:)
thanks a lot
링크가 복사됨
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
See this thread: https://software.intel.com/en-us/forums/intel-visual-fortran-compiler-for-windows/topic/539969
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Assuming that diedro hasn't set up any EQUIVALENCE or POINTER overlap between these arrays, there's no reason for the generated code to differ (probably a call to an intel_fast_memcpy, in the absence of directives to the contrary). You can't call it a "very simple question" considering that it doesn't make sense in isolation.
AA(:)=BB(:) used to be more likely to provoke an extra copy than AA=BB, but one might hope that such an embarrassment is a thing of the past.
There's a use for the opt-report.