Differences From Artifact [64cc71dd61]:
- File src/OFDictionary_hashtable.m — part of check-in [8892ae9fcc] at 2012-07-12 01:28:46 on branch trunk — Don't access isa directly. (user: js, size: 18063) [annotate] [blame] [check-ins using]
To Artifact [ce4770d88a]:
- File
src/OFDictionary_hashtable.m
— part of check-in
[1255f3a11a]
at
2012-08-10 20:08:24
on branch trunk
— Directly use the runtime's autorelease pools.
This greatly improves performance, as it gets rid of the overhead of
OFAutoreleasePool. (user: js, size: 17994) [annotate] [blame] [check-ins using]
︙ | |||
22 23 24 25 26 27 28 | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 | - + | #import "OFDictionary_hashtable.h" #import "OFMutableDictionary_hashtable.h" #import "OFEnumerator.h" #import "OFArray.h" #import "OFString.h" #import "OFXMLElement.h" |
︙ | |||
120 121 122 123 124 125 126 | 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | - + | [dictionary class] == [OFMutableDictionary_hashtable class]) return [self _initWithDictionary: dictionary copyKeys: YES]; self = [super init]; @try { |
︙ | |||
147 148 149 150 151 152 153 | 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 | - + - + | count: newSize]; for (i = 0; i < newSize; i++) data[i] = NULL; size = newSize; |
︙ | |||
183 184 185 186 187 188 189 | 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 | - + | bucket->key = [key copy]; bucket->object = [object retain]; bucket->hash = hash; data[i] = bucket; } |
︙ | |||
497 498 499 500 501 502 503 | 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 | - - + | return self; } - initWithSerialization: (OFXMLElement*)element { @try { |
︙ | |||
524 525 526 527 528 529 530 | 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 | - - + - + - + | if ([keys count] != [objects count]) @throw [OFInvalidFormatException exceptionWithClass: [self class]]; keyEnumerator = [keys objectEnumerator]; objectEnumerator = [objects objectEnumerator]; |
︙ |