Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
f325e03f
Kaydet (Commit)
f325e03f
authored
Agu 01, 2010
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#8230: make Lib/test/sortperf.py run on Python 3.
üst
f02e7367
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
sortperf.py
Lib/test/sortperf.py
+4
-4
NEWS
Misc/NEWS
+2
-0
No files found.
Lib/test/sortperf.py
Dosyayı görüntüle @
f325e03f
...
...
@@ -118,12 +118,12 @@ def tabulate(r):
L
=
L
*
(
n
//
4
)
# Force the elements to be distinct objects, else timings can be
# artificially low.
L
=
map
(
lambda
x
:
--
x
,
L
)
L
=
list
(
map
(
lambda
x
:
--
x
,
L
)
)
doit
(
L
)
# ~sort
del
L
# All equal. Again, force the elements to be distinct objects.
L
=
map
(
abs
,
[
-
0.5
]
*
n
)
L
=
list
(
map
(
abs
,
[
-
0.5
]
*
n
)
)
doit
(
L
)
# =sort
del
L
...
...
@@ -131,11 +131,11 @@ def tabulate(r):
# for an older implementation of quicksort, which used the median
# of the first, last and middle elements as the pivot.
half
=
n
//
2
L
=
range
(
half
-
1
,
-
1
,
-
1
)
L
=
list
(
range
(
half
-
1
,
-
1
,
-
1
)
)
L
.
extend
(
range
(
half
))
# Force to float, so that the timings are comparable. This is
# significantly faster if we leave tham as ints.
L
=
map
(
float
,
L
)
L
=
list
(
map
(
float
,
L
)
)
doit
(
L
)
# !sort
print
()
...
...
Misc/NEWS
Dosyayı görüntüle @
f325e03f
...
...
@@ -15,6 +15,8 @@ Core and Builtins
Library
-------
- Issue #8230: Fix Lib/test/sortperf.py.
- Issue #8620: when a Cmd is fed input that reaches EOF without a final
newline, it no longer truncates the last character of the last command line.
...
...
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