Alamofire vs URLSession: a comparison for networking in Swift
Alamofire vs URLSession: a comparison for networking in Swift
Alamofire and URLSession both help you to make network requests in Swift. The URLSession API is part of the foundation framework, whereas…
medium.com
- 요약-
Alamofire는 쓰기 편하고 retry 등의 기능을 지원한다. URLSession이 등장한 이후로는 굳이 필요없다면 쓰지 않아도됨. 하지만 커스텀하기 귀찮거나 편하게 쓰고 싶다면 Alamofire를 사용해라. 큰 규모의 오픈소스라 유지보수 걱정은 덜하다. Alamofire의 어원은 꽃 ㅎㅎ
Performance Impact of Dynamic Type Casting in Swift Classes
Performance Impact of Dynamic Type Casting in Swift Classes
In Swift, type casting allows you to treat an object as an instance of a different type within its class hierarchy. This is achieved using…
medium.com
- 요약 -
- TypeCasting Performance에 대해 다루고 있음
- Upcasting을 제외하고는 전부 런타임에 진행된다. class → protocol 또한. 그렇기에 Polymorphism를 적극 활용하여 overriding을 적극 사용하고 Upcasting을 제외한 typeCasting에 경우 자제하며 특히 loop나 자주 사용되는 코드에서는 자제해야한다
- Final을 통해 dynamic dispatch를 없애는것도 좋다. 그리고 제네릭을 사용하면 런타임에 타입체크를 줄일 수 있다.
'공부 > medium' 카테고리의 다른 글
[Swift] Swift 6.0 Protocol Extensions 추가 기능 (0) | 2025.04.01 |
---|---|
[SwiftUI] Why you Need AnyView? AnyView는 잘 쓰면 좋다 [요약/정리] (0) | 2025.03.26 |
Alamofire vs URLSession: a comparison for networking in Swift
Alamofire vs URLSession: a comparison for networking in Swift
Alamofire and URLSession both help you to make network requests in Swift. The URLSession API is part of the foundation framework, whereas…
medium.com
- 요약-
Alamofire는 쓰기 편하고 retry 등의 기능을 지원한다. URLSession이 등장한 이후로는 굳이 필요없다면 쓰지 않아도됨. 하지만 커스텀하기 귀찮거나 편하게 쓰고 싶다면 Alamofire를 사용해라. 큰 규모의 오픈소스라 유지보수 걱정은 덜하다. Alamofire의 어원은 꽃 ㅎㅎ
Performance Impact of Dynamic Type Casting in Swift Classes
Performance Impact of Dynamic Type Casting in Swift Classes
In Swift, type casting allows you to treat an object as an instance of a different type within its class hierarchy. This is achieved using…
medium.com
- 요약 -
- TypeCasting Performance에 대해 다루고 있음
- Upcasting을 제외하고는 전부 런타임에 진행된다. class → protocol 또한. 그렇기에 Polymorphism를 적극 활용하여 overriding을 적극 사용하고 Upcasting을 제외한 typeCasting에 경우 자제하며 특히 loop나 자주 사용되는 코드에서는 자제해야한다
- Final을 통해 dynamic dispatch를 없애는것도 좋다. 그리고 제네릭을 사용하면 런타임에 타입체크를 줄일 수 있다.
'공부 > medium' 카테고리의 다른 글
[Swift] Swift 6.0 Protocol Extensions 추가 기능 (0) | 2025.04.01 |
---|---|
[SwiftUI] Why you Need AnyView? AnyView는 잘 쓰면 좋다 [요약/정리] (0) | 2025.03.26 |