3 ms·
(JP from Realm here) Yes, it's all bits, but those bits matter :). The internal query engine is extremely optimized based on the layout of those bits, on a per
by jpsim 10y ago
(JP from Realm here)
Yes, it's all bits, but those bits matter :). The internal query engine is extremely optimized based on the layout of those bits, on a per-architecture basis.
Also, integers are adaptively bit-packed, so you shouldn't worry about the size of your integers, as Realm will intelligently use the appropriate widths.
I'd suggest continuing to use this computed property pattern and to keep track of #651[0] where we're tracking better support for this.
[0]: https://github.com/realm/realm-cocoa/issues/651 https://github.com/realm/realm-cocoa/issues/651
- chris_7 10y agoOh, given the packing, is there any reason to use the property instead of just moving up a size?
- jpsim 10y agoI'm not sure what you mean here. If you mean "why would I ever use Int8 or Int32, etc. if Int64 won't take up more space in the file" the answer would be memory considerations when you take that data out of the Realm... you should just use the size you need and you'll be ok.