Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8034397
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T01:59:55+00:00 2026-06-05T01:59:55+00:00

Is it overkill to store 4 types of attributes into a 32-bit int within

  • 0

Is it overkill to store 4 types of attributes into a 32-bit int within Core Data?
Or should I simply create a separate attribute for each of them? (will use logic operators to set/get).

I plan to add a new entity to an existing object which will contain anywhere from 200-400 items with about 14 attributes (including an ‘index’ attribute for ordering purposes). Only one set will be operated on or viewed at any time.

I will need to maintain undo support (referencing How do I improve performance of Core Data object insert on iPhone?)

I may be able to ween this down to about 8 attributes if I store several attributes into a single field. Barring the searchability issue, will I be saving appreciable space?

Also, is it unreasonable to store a set of 400 objects in a growing list of items which will grow at a rate of about 1-3 per week?

I hear some people storing thousands of items in core data so perhaps I am being paranoid. I suppose in the long-run I will need to provide an export archive option, perhaps to iCloud.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T01:59:56+00:00Added an answer on June 5, 2026 at 1:59 am

    So you’re saying you have 400 objects with 14 attributes, which you could either store as separate integers, or combine into fewer 32-bit (4-byte) values?

    400 x 14 x 4 bytes = 22,400 bytes

    That’s not very much space at all. If you cut that in half, you’re saving 11K, which will probably be dwarfed by the size of the extra code you’ll be generating to encode and decode these values.

    But don’t take my word for it: write a small test program that stuffs values into Core Data, then run it under the profiler to see what happens.

    You can also read up on SQLite and how it stores values, since that’s what Core Data is using under the hood.

    My gut says you’re being paranoid and your bit twiddling code won’t help much. Worse, it will be a great way to introduce really subtle bugs when you forget that you are shifting with sign extension. (And I love writing bit-twiddling code!)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently my code below works fine but it's a bit of overkill. In my
In my app I need to store some simple data both in memroy and
I have a few data values that I need to store on my rails
I have some data that I want to store somewhere in my Rails app
The project I have been given is to store and retrieve unstructured data from
I am creating a widget, and I need to store some data for it.
I want to store some test data for a FlexUnit test in small XML
I need to store an array of user created objects (a user enters data
Question: How best* can I store and access fixed U.S. State attributes in my
I'm intending to use files to store data as a kind of cache for

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.