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 8598663
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:12:27+00:00 2026-06-12T01:12:27+00:00

In coding a physics-based game, I have created everything from subclassed NSObjects. Force vectors

  • 0

In coding a physics-based game, I have created everything from subclassed NSObjects. Force vectors are stored in NSArrays for each particle object, then acceleration, velocity, and position are calculated at 60fps with a CADisplayLink.

Version one wasn’t meant to be optimized, but it appears to run very well. CADisplayLink is fast and consistent. However, when I looked at the allocation statistics… Well, I’ve never seen anything like it. ARC does a great job at keeping the Live Bytes under 1 megabyte, but this thing is shredding through 6 gigs a minute of overall allocations.

So my questions are:

Is this code dangerous to run on a device for long periods of time? How “bad” is this? Will apple even accept this or am I going to fry iPads if I continue developing like this?

enter image description here

  • 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-12T01:12:28+00:00Added an answer on June 12, 2026 at 1:12 am

    Optimizing to minimize allocation throughput is an exceptionally effective method to employ.

    Notably, every allocation is likely going to require most of the bytes in the allocation to be touched, potentially a few writes and many reads, per every byte in the allocation. All those reads/writes requires CPU cycles and transactions across the system bus.

    So, yes, it will eat battery and will increase system temperature. It is unlikely, though, to burn up the device. 🙂

    Sort by the “#Transitory” and start figuring out how to eliminate transitory allocations. I typically initially ignore the various Malloc ## Bytes allocations as those are most often backing stores in instances of some class. Eliminate the transitory instance(s) and the # of mallocs drops, too.

    For any given allocation type, you can click through to see a list of where all the allocations of that type were created. Sort by the function name and then get a feel for the most common function. Target your optimizations there.

    Using this method, I’ve been able to massively optimize some large applications; sometimes reducing the time of execution of certain operations by upwards of 75% by simply minimizing allocation rates!

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

Sidebar

Related Questions

Im coding a text-based mafia game in norwegian and need help with time detection.
I'm coding simple game which I plan to make multiplayer (over the network) as
Coding Language: C# Framework: .NET We have built a software, which among many other
I´m coding a CSS menu for Wordpress and I have this stupid problem: I
Having a slight c# problem here. I'm currently coding a small platformer-game with Unity
Coding standards in place mean I do not have an option of using ajax
PHP coding standards say: ... PHP holds the length property of each string, and
When coding up, say, a registration form from scratch, does it make sense to
Coding in ASP.NET 4.0 / javascript/ jQuery/ WebServices The Scenario I have an analytics
# -*- coding: utf-8 -*- from pyquery import PyQuery as pq from urllib import

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.