You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IndexPath._unconditionallyBridgeFromObjectiveC calls to init(nsIndexPath:) which calls malloc unconditionally in all cases. This is wasteful since we are already allocating an array to store the indicies.
100000 calls of let _ = path as IndexPath with path defined as let path = NSIndexPath(forItem: 5, inSection: 6)
min: 0.000388
max: 0.339831
avg: 0.000594
dev: 0.001665
med: 0.000556
It seems that any array backing more than zero elements will call malloc up to two times when bridging. This behavior is wasteful and we can probably do much better in the round trip.
The text was updated successfully, but these errors were encountered:
Additional Detail from JIRA
md5: af451f507d3374f2c3970d7aec78113b
Issue Description:
IndexPath._unconditionallyBridgeFromObjectiveC calls to init(nsIndexPath:) which calls malloc unconditionally in all cases. This is wasteful since we are already allocating an array to store the indicies.
100000 calls of let _ = path as IndexPath with path defined as let path = NSIndexPath(forItem: 5, inSection: 6)
min: 0.000388
max: 0.339831
avg: 0.000594
dev: 0.001665
med: 0.000556
It seems that any array backing more than zero elements will call malloc up to two times when bridging. This behavior is wasteful and we can probably do much better in the round trip.
The text was updated successfully, but these errors were encountered: