• 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: Do IMPs move once they're loaded?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Do IMPs move once they're loaded?


  • Subject: Re: Do IMPs move once they're loaded?
  • From: Bob Ippolito <email@hidden>
  • Date: Sat, 29 Jan 2005 20:11:54 -0500


On Jan 29, 2005, at 18:11, Ken Tozier wrote:


On Jan 29, 2005, at 5:37 PM, Sherm Pendley wrote:

On Jan 29, 2005, at 5:08 PM, Ken Tozier wrote:

I want to cache IMPs in a dictionary for a class that reads many different data types from disk as quickly as possible.

First things first - have you profiled your app to be certain that message-passing is a significant bottleneck?

No, I haven't, still figuring out the best way to write the class in question. The basic idea is to archive a hash code for a method selector (because hash codes are of fixed length while selectors are not) that way, when the data is read back from disk, I could just do a quick lookup of the hash and run the method that is optimized for reading this type of data. This would save lots of disk space (potentially millions of copies of variable length "SEL"s) and the need for huge switch statements to route the data to it's optimized read method.

The address of a selector *is* a hash code. Any two @selector(foo) will be the same address in a given process.


-bob

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Do IMPs move once they're loaded?
      • From: Ken Tozier <email@hidden>
References: 
 >Do IMPs move once they're loaded? (From: Ken Tozier <email@hidden>)
 >Re: Do IMPs move once they're loaded? (From: Sherm Pendley <email@hidden>)
 >Re: Do IMPs move once they're loaded? (From: Ken Tozier <email@hidden>)

  • Prev by Date: Re: Highlighting Cell Problem
  • Next by Date: Text Becomes Clipping
  • Previous by thread: Re: Do IMPs move once they're loaded?
  • Next by thread: Re: Do IMPs move once they're loaded?
  • Index(es):
    • Date
    • Thread