bugGNUstep - Bugs: bug #8365, -[NSString hash] limitation makes...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #8365: -[NSString hash] limitation makes dictionaries horribly horribly slow

Submitted by:  Larry Campbell <lcampbel>
Submitted on:  Tue 30 Mar 2004 04:46:57 AM UTC  
 
Category: Base/FoundationSeverity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Wed 31 Mar 2004 11:41:02 AM UTC, comment #1:

Fixed in CVS ... I think it made sense to limit this for general performance in the past, but we now cache the hash values for strings (apart from constant strings) so the performance trade-off is probably in favour of using all
characters now.
For short strings this should make no difference.

Richard Frith-Macdonald <CaS>
Project Member
Tue 30 Mar 2004 04:46:57 AM UTC, original submission:

For some reason not explained in any comments I could find, -[NSString hash] ignores all but the first 63 bytes of a string. This means that if you're storing large strings in an NSDictionary, your performance is completely hosed. I just removed the 63-byte truncation, and an operation that used to take 20 to 30 minutes now takes only seconds -- two to three orders of magnitude faster.

What is the reason, if any, for this limitation? Shouldn't it be removed?

Larry Campbell <lcampbel>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 3 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Wed 31 Mar 2004 11:41:02 AM UTCCaSStatusNone=>Fixed
  Open/ClosedOpen=>Closed
Tue 30 Mar 2004 04:46:57 AM UTClcampbelCarbon-Copy-=>Added lcampbel --AT-- akamai --DOT-- com

Back to the top


Powered by Savane 3.1-cleanup1