Comments (1)
루프 퓨전
- 루프 퓨전을 사용하면 여러 루프를 단일 병렬 루프로 결합하여 루프의 세분성을 높일 수 있음
- 루프 퓨전은 트립 횟수가 동일한 루프가 서로 인접해 있을 때 쉽고 안전함
루프 퓨전 전
for (i=0; i < 100; i++) {
a[i] = a[i] + b[i];
}
for (i=0; i < 100; i++) {
b[i] = a[i] * d[i];
}
루프 퓨전 후
for (i=0; i < 100; i++) {
a[i] = a[i] + b[i];
b[i] = a[i] * d[i];
}
안전하지 않은 루프 퓨전 후보
for (i=0; i < 100; i++) {
a[i] = a[i] + b[i];
}
for (i=0; i < 100; i++) {
a[i+1] = a[i] * d[i];
}
from 2022-modern-java-in-action.
Related Issues (20)
- 컬렉션과 스트림의 차이는 뭘까? HOT 1
- 스트림은 만능일까? HOT 1
- 스트림이 게으르게 계산하면서 얻는 이점은 무엇일까? HOT 1
- 스트림 파이프라인은 무엇일까? HOT 1
- 스트림 연산은 어떻게 작동할까? HOT 1
- 쇼트서킷은 어떻게 작동하는 것일까? HOT 2
- 스트림 연산에 있어 상태가 있거나 없다는 의미가 무엇인가? HOT 2
- 무한스트림과 가변, 불변 상태 HOT 1
- Optional을 사용해야 하는 적절한 경우는 언제일까? HOT 1
- 무한 스트림의 존재 의의
- reduce를 사용하는 것이 왜 반복문보다 장점을 가지는 것일까? HOT 2
- flatMap 이란? HOT 1
- null에 안전한 스트림 생성 방법 HOT 1
- Collectors.toMap 실습 HOT 2
- groupingBy와 partitioningBy 비교 HOT 1
- collect vs collector vs collectors (vs Collections vs Collection) 구분하기 HOT 2
- 내장 Collector의 Characteristics 파악하기 HOT 1
- reduce vs collect HOT 1
- collectionAndThen() 는 언제 사용하면 좋을까?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from 2022-modern-java-in-action.