Re: [swift-corelibs-dev] IndexPath performance

2016-08-02 Thread Stephan Tolksdorf via swift-corelibs-dev
ends, so we may just want to special case those. Unfortunately, >> NSIndexPath is not abstract, so subclassing it in the same way that we do >> for a few of the other bridged types (to use native Swift refcounting) is >> not easy. On the other hand, the ObjC implementat

Re: [swift-corelibs-dev] IndexPath performance

2016-08-02 Thread Stephan Tolksdorf via swift-corelibs-dev
ementation does use tagged >> pointers, so some NSIndexPaths are really cheap to create. >> >> - Tony >> >> > On Aug 1, 2016, at 11:44 PM, Stephan Tolksdorf via swift-corelibs-dev < >> swift-corelibs-dev@swift.org> wrote: >> > >> > H

Re: [swift-corelibs-dev] IndexPath performance

2016-08-02 Thread Stephan Tolksdorf via swift-corelibs-dev
hand, the ObjC implementation does use tagged > pointers, so some NSIndexPaths are really cheap to create. > > - Tony > > > On Aug 1, 2016, at 11:44 PM, Stephan Tolksdorf via swift-corelibs-dev < > swift-corelibs-dev@swift.org> wrote: > > > > Hi, > > >

[swift-corelibs-dev] IndexPath performance

2016-08-01 Thread Stephan Tolksdorf via swift-corelibs-dev
Hi, IndexPath is currently implemented using an [Int] array that is bridged to an NSIndexPath only on demand. Since IndexPath values are primarily used together with Objective-C APIs, wouldn't it be better to implement IndexPath directly as an NSIndexPath wrapper, in order to avoid the overhead of