Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
cc15b42e
Commit
cc15b42e
authored
Dec 16, 1996
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change comment about MINSIZE -- 10 is optimal for Python.
parent
81a6fe9b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
Objects/listobject.c
Objects/listobject.c
+6
-3
No files found.
Objects/listobject.c
View file @
cc15b42e
...
...
@@ -630,9 +630,12 @@ insertionsort(array, size, compare)
}
/* MINSIZE is the smallest array we care to partition; smaller arrays
are sorted using a straight insertion sort (above). You may want
to play with this to tune it for your system. It must be at least
2; more than 20 probably doesn't make sense. */
are sorted using a straight insertion sort (above). It must be at
least 2 for the quicksort implementation to work. Assuming that
comparisons are more expensive than everything else (and this is a
good assumption for Python), it should be 10, which is the cutoff
point: quicksort requires more comparisons than insertion sort for
smaller arrays. */
#define MINSIZE 10
/* STACKSIZE is the size of our work stack. A rough estimate is that
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment