https://developer.apple.com/videos/play/wwdc2015/409/
TODO
- [x] 그냥 한번 듣기
- [x] Generics 먼저 정리하자!
- [ ] 처음부터 정리하기 ( 모두 다 정리할 필요는 없을 듯 )
<aside>
📌 목차
Writing High Performance Swift Code
- Reference Counting
- How Reference Counting Works
- Generics
- How Generics Work
- Generic Specialization
- Specialization is Limited by Visibility
- Whole Module Optimization
- Dynamic Dispatch
</aside>
요약
- Swift 는 다양한 Complier Optimization 을 제공한다.
- 예시 - Bound check elimination
- Whole Module Optimization
- 컴파일러의 가시성을 모듈 단위로 늘려주어 더 얻게 된 정보로 공격적인 최적화를 가능하게 해줌
- 컴파일 시간이 조금더 걸리지만 런타임의 실행속도는 빨라짐
- 몇몇 부분에서는 병렬적으로 실행함으로서 컴파일 시간을 좀 줄임
- Reference Counting
- Generics
- Dynamic Dispatch
Reference Counting
- In general, the compiler can eliminate most reference counting overhead without any help.
But sometimes you may still find slowdowns in your code due to reference counting overhead.