Time complexity of NS(Mutable)Array should be documented

Originator:michaelhochs
Number:rdar://35680737 Date Originated:24-Nov-2017 09:05 AM
Status:Open Resolved:
Product:Documentation Product Version:iOS 11
Classification:Enhancement Reproducible:Always
 
Summary:
From various sources on the internet one can figure out that an NS(Mutable)Array is anything but a usual array. It offers a lot of awesome features, especially when it comes to time complexity. Sadly though, this is completely undocumented. For example in many cases apparently adding or removing items from the front of an NSMutableArray take O(1) time instead of the usual O(n) of an array. This is an awesome feature and makes actual queues / linked lists obsolete for many use cases. Therefore this behavior should be documented.

Steps to Reproduce:
 

Expected Results:
 

Actual Results:
 

Version:
iOS 11

Notes:

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!