Re: Do IMPs move once they're loaded?
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