- Notifications
You must be signed in to change notification settings - Fork5
Commit25c5392
committed
Improve performance in freeing memory contexts
The single linked list of memory contexts could result in O(N^2)performance to free a set of contexts if they were not freed inreverse order of creation. In many cases the reverse order wasused, but there were some significant exceptions that caused real-world performance problems. Rather than requiring all callers tocare about the order in which contexts were freed, and hunting downand changing all existing cases where the wrong order was used, weadd one pointer per memory context so that the implementationdetails are not so visible.Jan Wieck1 parent521f045 commit25c5392
2 files changed
+15
-12
lines changedLines changed: 14 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
331 | 331 |
| |
332 | 332 |
| |
333 | 333 |
| |
334 |
| - | |
335 |
| - | |
| 334 | + | |
| 335 | + | |
336 | 336 |
| |
337 | 337 |
| |
338 |
| - | |
339 |
| - | |
340 |
| - | |
341 |
| - | |
342 |
| - | |
343 |
| - | |
344 |
| - | |
345 |
| - | |
346 |
| - | |
347 |
| - | |
| 338 | + | |
| 339 | + | |
348 | 340 |
| |
| 341 | + | |
| 342 | + | |
| 343 | + | |
349 | 344 |
| |
350 | 345 |
| |
351 | 346 |
| |
352 | 347 |
| |
353 | 348 |
| |
354 | 349 |
| |
355 | 350 |
| |
| 351 | + | |
356 | 352 |
| |
| 353 | + | |
| 354 | + | |
357 | 355 |
| |
358 | 356 |
| |
359 | 357 |
| |
360 | 358 |
| |
361 | 359 |
| |
| 360 | + | |
362 | 361 |
| |
363 | 362 |
| |
364 | 363 |
| |
| |||
714 | 713 |
| |
715 | 714 |
| |
716 | 715 |
| |
| 716 | + | |
717 | 717 |
| |
718 | 718 |
| |
719 | 719 |
| |
| |||
728 | 728 |
| |
729 | 729 |
| |
730 | 730 |
| |
| 731 | + | |
| 732 | + | |
731 | 733 |
| |
732 | 734 |
| |
733 | 735 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
79 | 79 |
| |
80 | 80 |
| |
81 | 81 |
| |
| 82 | + | |
82 | 83 |
| |
83 | 84 |
| |
84 | 85 |
| |
|
0 commit comments
Comments
(0)