- 16 Feb, 2004 1 commit
-
-
Neal Norwitz authored
-
- 15 Feb, 2004 7 commits
-
-
Martin v. Löwis authored
/usr/bin/env python'%{binsuffix} Backported to 2.3.
-
Martin v. Löwis authored
Backported to 2.3.
-
Martin v. Löwis authored
-
Martin v. Löwis authored
Backported to 2.3.
-
Neil Schemenauer authored
-
Raymond Hettinger authored
to list_init. * Replaced the code in list_extend with the superior code from list_fill. * Eliminated list_fill. Results: * list.extend() no longer creates an intermediate tuple except to handle the special case of x.extend(x). The saves memory and time. * list.extend(x) runs about the same x is a list or tuple, a little faster when x is an iterable not defining __len__, and twice as fast when x is an iterable defining __len__. * the code is about 15 lines shorter and no longer duplicates functionality.
-
Raymond Hettinger authored
utilization, and speed: * Moved the responsibility for emptying the previous list from list_fill to list_init. * Replaced the code in list_extend with the superior code from list_fill. * Eliminated list_fill. Results: * list.extend() no longer creates an intermediate tuple except to handle the special case of x.extend(x). The saves memory and time. * list.extend(x) runs 5 to 10% faster when x is a list or tuple 15% faster when x is an iterable not defining __len__ twice as fast when x is an iterable defining __len__ * the code is about 15 lines shorter and no longer duplicates functionality.
-
- 14 Feb, 2004 4 commits
-
-
Raymond Hettinger authored
The Py2.3 approach overallocated small lists by up to 8 elements. The last checkin would limited this to one but slowed down (by 20 to 30%) the creation of small lists between 3 to 8 elements. This tune-up balances the two, limiting overallocation to 3 elements (significantly reducing space consumption from Py2.3) and running faster than the previous checkin. The first part of the growth pattern (0, 4, 8, 16) neatly meshes with allocators that trigger data movement only when crossing a power of two boundary. Also, then even numbers mesh well with common data alignments.
-
Raymond Hettinger authored
-
Gustavo Niemeyer authored
-
Gustavo Niemeyer authored
as parameter.
-
- 13 Feb, 2004 6 commits
-
-
Raymond Hettinger authored
-
Fred Drake authored
(re-using an existing test object class) no longer triggered the original segfault when the fix was backed out; restoring the local test object class to make the test effective the assignment of the ref created at the end does not affect the test, since the segfault happended before weakref.ref() returned; removing the assignment
-
Raymond Hettinger authored
* Move an example out of a comment.
-
Raymond Hettinger authored
More than doubles its speed.
-
Raymond Hettinger authored
realloc(). This is achieved by tracking the overallocation size in a new field and using that information to skip calls to realloc() whenever possible. * Simplified and tightened the amount of overallocation. For larger lists, this overallocates by 1/8th (compared to the previous scheme which ranged between 1/4th to 1/32nd over-allocation). For smaller lists (n<6), the maximum overallocation is one byte (formerly it could be upto eight bytes). This saves memory in applications with large numbers of small lists. * Eliminated the NRESIZE macro in favor of a new, static list_resize function that encapsulates the resizing logic. Coverting this back to macro would give a small (under 1%) speed-up. This was too small to warrant the loss of readability, maintainability, and de-coupling. * Some functions using NRESIZE had grown unnecessarily complex in their efforts to bend to the macro's calling pattern. With the new list_resize function in place, those other functions could be simplified. That is being saved for a separate patch. * The ob_item==NULL check could be eliminated from the new list_resize function. This would entail finding each piece of code that sets ob_item to NULL and adding a new line to invalidate the overallocation tracking field. Rather than impose a new requirement on other pieces of list code, it was preferred to leave the NULL check in place and retain the benefits of decoupling, maintainability and information hiding (only PyList_New() and list_sort() need to know about the new field). This approach also reduces the odds of breaking an extension module. (Collaborative effort by Raymond Hettinger, Hye-Shik Chang, Tim Peters, and Armin Rigo.)
-
Hye-Shik Chang authored
no major codepages unsupported by Python, so remove the eg. case.
-
- 12 Feb, 2004 6 commits
-
-
Fred Drake authored
-
Fred Drake authored
-
Walter Dörwald authored
From SF patch #852334.
-
Michael W. Hudson authored
Remove the ability to use (from C) arbitrary objects supporting the read buffer interface as the co_code member of code objects.
-
Fred Drake authored
-
Raymond Hettinger authored
-
- 10 Feb, 2004 7 commits
-
-
Skip Montanaro authored
-
Fred Drake authored
-
Neal Norwitz authored
-
Skip Montanaro authored
-
Skip Montanaro authored
sentinel variable
-
Raymond Hettinger authored
-
Raymond Hettinger authored
-
- 09 Feb, 2004 4 commits
-
-
Fred Drake authored
-
Fred Drake authored
-
Andrew M. Kuchling authored
-
Thomas Heller authored
the function prototype. Already backported to release23-maint.
-
- 08 Feb, 2004 5 commits
-
-
Raymond Hettinger authored
(Contributed by George Yoshida.)
-
Raymond Hettinger authored
-
Raymond Hettinger authored
-
Raymond Hettinger authored
(Contributed by Andrew I MacIntyre.) disables opcode prediction when dynamic execution profiling is in effect, so the profiling counters at the top of the main interpreter loop in eval_frame() are updated for each opcode.
-
Raymond Hettinger authored
(Contributed by George Yoshida.) * Also convert tabs to spaces.
-