- Timestamp:
- Oct 30, 2010, 6:46:24 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Generics/TemplateGenerics/Demo/UMainForm.pas
r78 r79 210 210 WriteLn('Add: ' + IntToStr(List.Count) + ' ops/sec'); 211 211 List.Clear; 212 Application.ProcessMessages; 212 213 213 214 StartTime := Now; … … 217 218 WriteLn('Insert: ' + IntToStr(List.Count) + ' ops/sec'); 218 219 List.Clear; 220 Application.ProcessMessages; 219 221 220 222 for I := 0 to 1000000 do … … 228 230 WriteLn('Delete: ' + IntToStr(I) + ' ops/sec'); 229 231 List.Clear; 232 Application.ProcessMessages; 230 233 231 234 for I := 0 to 1000000 do … … 239 242 WriteLn('Move: ' + IntToStr(I) + ' ops/sec'); 240 243 List.Clear; 244 Application.ProcessMessages; 241 245 242 246 for I := 0 to 1000000 do … … 250 254 WriteLn('Exchange: ' + IntToStr(I) + ' ops/sec'); 251 255 List.Clear; 256 Application.ProcessMessages; 252 257 253 258 for I := 0 to 1000000 do … … 261 266 WriteLn('IndexOf: ' + IntToStr(I) + ' ops/sec'); 262 267 List.Clear; 268 Application.ProcessMessages; 263 269 finally 264 270 List.Free; … … 274 280 WriteLn('Add: ' + IntToStr(List2.Count) + ' ops/sec'); 275 281 List2.Clear; 282 Application.ProcessMessages; 276 283 277 284 StartTime := Now; … … 281 288 WriteLn('Insert: ' + IntToStr(List2.Count) + ' ops/sec'); 282 289 List2.Clear; 290 Application.ProcessMessages; 283 291 284 292 for I := 0 to 1000000 do … … 291 299 until (Now - StartTime) > OneSecond; 292 300 WriteLn('Delete: ' + IntToStr(I) + ' ops/sec'); 301 Application.ProcessMessages; 293 302 294 303 for I := 0 to 1000000 do … … 301 310 until (Now - StartTime) > OneSecond; 302 311 WriteLn('Move: ' + IntToStr(I) + ' ops/sec'); 312 Application.ProcessMessages; 303 313 304 314 for I := 0 to 1000000 do … … 311 321 until (Now - StartTime) > OneSecond; 312 322 WriteLn('Exchange: ' + IntToStr(I) + ' ops/sec'); 323 Application.ProcessMessages; 313 324 314 325 for I := 0 to 1000000 do … … 321 332 until (Now - StartTime) > OneSecond; 322 333 WriteLn('IndexOf: ' + IntToStr(I) + ' ops/sec'); 334 Application.ProcessMessages; 323 335 324 336 finally
Note:
See TracChangeset
for help on using the changeset viewer.