Would it be possible moving from OBJ-C -> Swift when dealing with metal in MoltenVK? #1662
Replies: 3 comments 1 reply
-
Swift uses ARC, and unlike in Objective-C, it cannot be turned off. My understanding is that MoltenVK deliberately uses MRR because the retain and release calls inserted by ARC, some of which are extraneous and unnecessary, slow it down too much. Also, since Swift does not yet have interop with C++ (only with C and Objective-C), rewriting MoltenVK in Swift would be a humongous undertaking, one that I'm not sure is worth the cost. |
Beta Was this translation helpful? Give feedback.
-
Yeah. What he (@cdavis5e) said. Interestingly, Apple has released |
Beta Was this translation helpful? Give feedback.
-
Well...Metal is still written in Objective-C. Both the Swift bindings, and Apple's new C++ bindings, are wrappers around that. But nevertheless...evolving to use the C++ wrapper within MoltenVK might make the MoltenVK code base more accessible to contributors coming from elsewhere. |
Beta Was this translation helpful? Give feedback.
-
The point is that Swift is claimed to be a faster language and also easier to use so more devs could help in the project?
Beta Was this translation helpful? Give feedback.
All reactions