• 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: Performance problem with GC enabled
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Performance problem with GC enabled


  • Subject: Re: Performance problem with GC enabled
  • From: John Engelhart <email@hidden>
  • Date: Fri, 13 Mar 2009 19:47:50 -0400

On Thu, Mar 12, 2009 at 3:17 PM, Peter Ammon <email@hidden> wrote:
>
> Hi John,
>
> Instead of storing each string individually into the heap, try batching up,
> say, 1k or so into a stack allocated buffer.  Then use
> objc_memmove_collectable() to move them in bulk into the heap at the point
> your stack allocated buffer gets full, or your scan finishes.
>

I actually did give this a shot, or something close to it.  I tried
using just the stack (swapping NSAllocateCollectable() with alloca()),
but no joy- exactly the same times came out.  Good call though.

The problem is objc_assign_strongCast(), which surprisingly doesn't
seem to have a 'fast path' escape if it detects a write to an address
on the stack.  I would have figured that at least the main threads
stack bounds would have been accounted for (I would be surprised if
this wasn't immutable once the linker handed off execution to the
program), as this really amounts to nothing more than a >= <= check,
but nope.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Performance problem with GC enabled
      • From: Peter Ammon <email@hidden>
References: 
 >Performance problem with GC enabled (From: John Engelhart <email@hidden>)
 >Re: Performance problem with GC enabled (From: Peter Ammon <email@hidden>)

  • Prev by Date: Using NSPersistentDocument without NSApp. OK?
  • Next by Date: sending rich text emails using Scripting Bridge and Mail
  • Previous by thread: Re: Performance problem with GC enabled
  • Next by thread: Re: Performance problem with GC enabled
  • Index(es):
    • Date
    • Thread