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
0e9958b5
Kaydet (Commit)
0e9958b5
authored
Ara 02, 2012
tarafından
Antoine Pitrou
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #16562: Optimize dict equality testing.
Patch by Serhiy Storchaka (reviewed by Martin and Raymond).
üst
181e20a6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
NEWS
Misc/NEWS
+2
-0
dictobject.c
Objects/dictobject.c
+6
-1
No files found.
Misc/NEWS
Dosyayı görüntüle @
0e9958b5
...
...
@@ -10,6 +10,8 @@ What's New in Python 3.4.0 Alpha 1?
Core and Builtins
-----------------
- Issue #16562: Optimize dict equality testing. Patch by Serhiy Storchaka.
- Issue #16588: Silence unused-but-set warnings in Python/thread_pthread
- Issue #16592: stringlib_bytes_join doesn'
t
raise
MemoryError
on
allocation
...
...
Objects/dictobject.c
Dosyayı görüntüle @
0e9958b5
...
...
@@ -2114,13 +2114,18 @@ dict_equal(PyDictObject *a, PyDictObject *b)
if
(
aval
!=
NULL
)
{
int
cmp
;
PyObject
*
bval
;
PyObject
**
vaddr
;
PyObject
*
key
=
ep
->
me_key
;
/* temporarily bump aval's refcount to ensure it stays
alive until we're done with it */
Py_INCREF
(
aval
);
/* ditto for key */
Py_INCREF
(
key
);
bval
=
PyDict_GetItemWithError
((
PyObject
*
)
b
,
key
);
/* reuse the known hash value */
if
((
b
->
ma_keys
->
dk_lookup
)(
b
,
key
,
ep
->
me_hash
,
&
vaddr
)
==
NULL
)
bval
=
NULL
;
else
bval
=
*
vaddr
;
Py_DECREF
(
key
);
if
(
bval
==
NULL
)
{
Py_DECREF
(
aval
);
...
...
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