FWIW, if you agree that this approach is reasonable, I would be willing
to write the patch for it.
-Kevin Ballard
On Tue, Aug 2, 2016, at 05:46 PM, Kevin Ballard wrote:
> I agree with Stephan, NSIndexPath performance is important and we
> should avoid the overhead of allocating/freeing an array f
I agree with Stephan, NSIndexPath performance is important and we should
avoid the overhead of allocating/freeing an array for the common case.
Instead of just always wrapping NSIndexPath, maybe we should just switch
the internal representation to something like
enum Indices {
case one(Int)
Tony,
I understand why you'd ideally want to have a real-world benchmark to guide
performance optimisations, but if you require that for every
performance-related change, you set a very high bar, and that bar will
probably have the effect of biasing performance downwards, since if there
is no exis
Hi Stephan,
> On Aug 2, 2016, at 6:04 PM, Stephan Tolksdorf wrote:
>
> Hi Parker,
>
> I noticed the IndexPath overhead when I investigated why a Swift 3
> implementation of UICollectionViewLayout.layoutAttributesForElementsInRect
> spent more time in malloc, free and related methods, but I do
Oh, I'm sorry, Tony, I was too hasty and mistook your last name for your
first name :-(
- Stephan
On 2 August 2016 at 12:04, Stephan Tolksdorf wrote:
> Hi Parker,
>
> I noticed the IndexPath overhead when I investigated why a Swift 3
> implementation of UICollectionViewLayout.layoutAttributesFo
Hi Parker,
I noticed the IndexPath overhead when I investigated why a Swift 3
implementation of UICollectionViewLayout.layoutAttributesForElementsInRect
spent more time in malloc, free and related methods, but I don't have a
benchmark.
Is it important that IndexPath uses native Swift refcounting?
Hi Stephan,
Do you have some benchmarks that you could share? That would help us focus
performance work in the right area.
I know that 2-item IndexPaths are super common with UIKit collection view and
friends, so we may just want to special case those. Unfortunately, NSIndexPath
is not abstrac
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