mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
Some final tiny optimisations for testing string equality.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@3045 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f57bb849fa
commit
7694a7f14e
7 changed files with 67 additions and 38 deletions
|
@ -55,10 +55,11 @@ myHash(NSObject *obj)
|
|||
c == _fastCls._NSGString ||
|
||||
c == _fastCls._NSGMutableString) {
|
||||
|
||||
if (((dictAccessToStringHack)obj)->_hash != 0) {
|
||||
return ((dictAccessToStringHack)obj)->_hash;
|
||||
if (((dictAccessToStringHack)obj)->_hash == 0) {
|
||||
((dictAccessToStringHack)obj)->_hash =
|
||||
_fastImp._NSString_hash(obj, @selector(hash));
|
||||
}
|
||||
return _fastImp._NSGString_hash(obj, @selector(hash));
|
||||
return ((dictAccessToStringHack)obj)->_hash;
|
||||
}
|
||||
}
|
||||
return [obj hash];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue