Performance - Structures in an NSValue Object and Container

In a situation where I need to save all data members in NSDictionary, does it make sense to invest in (my own NSValue) structures (custom types or even scalars, that is CGPoint)), so I can avoid the overhead of encoding / decoding it every time, when do i get or set a member?

For large structures (16 floats), the savings are significant for IMO. But even with CGPointI would save 4 bytes of copy, as well as encoding / decoding time.

+3
source share
3 answers

? .

, CFDictionary , ++ std::map/std::tr1::unordered_map ( ++, ).

+3

: . (, ) , .

+3

, NSDictionary , NSDictionary. .

+1

Source: https://habr.com/ru/post/1755239/


All Articles