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

  • Home
  • SEARCH
  • 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 8220307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T13:28:51+00:00 2026-06-07T13:28:51+00:00

Is there any advantages in performance that depend on what numbers you use as

  • 0

Is there any advantages in performance that depend on what numbers you use as tags?

I have 4 sets of objects that I am labeling with tags. Is there any reason not to skip numbers? Ie, could I have the first set run from 0 to 99, the second from 1000 – 1099, the third from 2000 – 2099, and the fourth from 100,000 to 100,099?

Note that I’m not actually using nearly this many objects in my code. So I’m not asking about performance issues with having this many objects. I just want to know if its bad to skip tags. It helps me organize my code and my thoughts. Anyone know how the tags are stored?

  • 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-07T13:28:53+00:00Added an answer on June 7, 2026 at 1:28 pm

    Tags are stored as integers. Integers on iOS as stored using 4 bytes. Comparing them to another integer value takes the exact same time no matter which value you are using.

    That said, there may however be internal optimizing in place for storing the view-hierachy. Just as an example, Apple may chose to use some kind of tree structure for mapping tags to views. That part I can not answer as those things are internal to Apple’s developers.

    You have two options;

    1. Measure yourself (using Instruments).
    2. Do not worry as the
      impact will be close to invisible no matter what.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Are there any performance advantages in using a ROLAP server such as Mondrian on
For 'large' tables, is there any reason not to put a filter on indexes
Is there any performance hit for writing a function such that local var statements
Does anyone know whether there are any performance trade-offs/advantages to assigning an object's fields
In addition, are there any performance advantages to static methods over instance methods? I
Are there any advantages of using one over the other besides readability?
Are there any advantages or disadvantages to using multiple assignment in a statement? In
Are there any advantages of Loaders over Async task? Also, how to make loaders
Are there any inherent advantages or disadvantages when it comes to handling DDoS attacks
Is there any advantage or where returning a iterator is more desirable that a

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.