Hi,
I'm looking into storing lots of number as Int16. Considering Core data because the rest of the models are implemented in Core data.
So I did a simple application. Core data with 1 entity and 1 attribute of Int16
type. Inserted 1 million entries in SQLite storage type and the file size turns out to be 16.2MB. Actually if I change to Int64
, I would get the same file size. If writing simple binary C array, should be around 2MB.
So question is, why did Core data bother with so many different kind of number format if everything will be casted to NSNumber anyway? And is there any way to make Core data store the data as true Int16
? or short
in C terms?
Thanks.