• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: speed of alloc/init for NSNumber
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: speed of alloc/init for NSNumber


  • Subject: Re: speed of alloc/init for NSNumber
  • From: mmalcolm crawford <email@hidden>
  • Date: Sun, 18 Jan 2004 14:39:52 -0800

On Jan 18, 2004, at 1:49 PM, Daryn wrote:
It makes sense that I don't need to worry about speed with only four
hundred rows. It just seems like good practice to avoid or minimize
allocating memory in any loop. I have three or four other dictionary
keys that also require release and alloc/inits messages to be sent.
Also, I have another table that I'm about to start working on that
will have 25 to 40 thousand rows. I'm wondering at what point I need
to worry about the speed of these release and alloc/inits messages.
I personally think everyone should always be concerned by speed. There
is certainly a cost to needless messages, particularly
alloc/init/release. It's taxing to both the cpu and memory allocators,
which is readily apparent on older/slower machines. Optimization
shouldn't be taken to an extreme too early, but avoiding this trio of
messages is almost always a win.

Here, though, there's a trade-off between the frequency of conversion between number objects and scalars for computation, and between scalars and number objects for display -- so the question is which trio...

That being said, I have been dismayed by the absence of certain mutable
classes.

Have you filed an enhancement request...? :-)

mmalc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >speed of alloc/init for NSNumber (From: Chuck Soper <email@hidden>)
 >Re: speed of alloc/init for NSNumber (From: Nat! <email@hidden>)
 >Re: speed of alloc/init for NSNumber (From: Chuck Soper <email@hidden>)
 >Re: speed of alloc/init for NSNumber (From: Daryn <email@hidden>)

  • Prev by Date: How can I accept directory drops to my app icon?
  • Next by Date: Re: speed of alloc/init for NSNumber
  • Previous by thread: Re: speed of alloc/init for NSNumber
  • Next by thread: Re: speed of alloc/init for NSNumber
  • Index(es):
    • Date
    • Thread