filmov
tv
Method Dispatch in Swift | Static | Dynamic | Message

Показать описание
Method Dispatch directly impacts the performance of the app, yet it gets the least attention.
In this video, I explained what is method dispatch, its types (Direct, Table, Message), witness table, how Swift decides when to use which type of method dispatch and everything else that falls in the scope.
As an implementation of the theory, video shows the comparison between the performance of Static Dispatch and Dynamic Dispatch using test cases (I bet that results will make you think).
For more details, you can refer this document for SIL (Swift Intermediate Language). It’s about how Swift is made.
Try searching ‘dispatch’ in the doc.
You can read about the things that I’ve skipped (due to the length of the video) in this article. It is very descriptive.
Chapters 👇🏼
0:00 Start
0:34 Interview Questions answered in the video
1:28 What is Method Dispatch
3:18 Static (Direct) Dispatch
4:07 Dynamic (Table) Dispatch
5:44 Message Dispatch
6:46 How Swift decides which type to use
8:29 Performance comparison using test cases
In this video, I explained what is method dispatch, its types (Direct, Table, Message), witness table, how Swift decides when to use which type of method dispatch and everything else that falls in the scope.
As an implementation of the theory, video shows the comparison between the performance of Static Dispatch and Dynamic Dispatch using test cases (I bet that results will make you think).
For more details, you can refer this document for SIL (Swift Intermediate Language). It’s about how Swift is made.
Try searching ‘dispatch’ in the doc.
You can read about the things that I’ve skipped (due to the length of the video) in this article. It is very descriptive.
Chapters 👇🏼
0:00 Start
0:34 Interview Questions answered in the video
1:28 What is Method Dispatch
3:18 Static (Direct) Dispatch
4:07 Dynamic (Table) Dispatch
5:44 Message Dispatch
6:46 How Swift decides which type to use
8:29 Performance comparison using test cases
Комментарии