On 11 Aug 2013, at 09:54, Matt Rice <[email protected]> wrote: > Likewise, a few ported apps have run into the case that NSMutableArray > usage optimized for OS X (linked list up to a certain size since > their implementation varies on array size) exhibits the pathological > behaviour under GNUstep (c array), and vice versa.
Several of our collections could do with some optimisation. For example: - Taking the libstdc++ <tr1/unordered_map> and making NSMutableDictionary a very thin wrapper around it gives 20-30% better performance than our GSIMap version. - In the profiling I've done, I've yet to find an NSDictionary instance whose keys were not strings, and yet we currently optimise for the general case of arbitrary objects and not for the strings-keys case. - Our NSMutableArray does very badly in the push / pop front case. I had another implementation a few years ago that would buffer a few objects in a separate array making this fast (amortising the move cost across multiple operations and avoiding it entirely if you only push / pop a small number of values). An alternative approach would be to detect this access pattern and turn it into an array that stored the variables in reverse. David -- Sent from my Difference Engine _______________________________________________ Discuss-gnustep mailing list [email protected] https://lists.gnu.org/mailman/listinfo/discuss-gnustep
