[SR-2875] Emit objc_allocWithZone(cls) instead of [cls allocWithZone:nil] #45469
Labels
compiler
The Swift compiler in itself
good first issue
Good for newcomers
improvement
IRGen
LLVM IR generation
performance
Additional Detail from JIRA
md5: 290b74ceb34276614c4313e6cf1f8348
Issue Description:
swiftc currently emits calls to `[cls allocWithZone:nil]` when constructing Objective-C objects. It should emit calls to `objc_allocWithZone(cls)` instead.
`objc_allocWithZone()` is faster (it avoids a message send when there are no overrides in place) and is a smaller call site.
The text was updated successfully, but these errors were encountered: