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
ce5179fc
Kaydet (Commit)
ce5179fc
authored
Ock 31, 2016
tarafından
Raymond Hettinger
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #23601: Use small object allocator for dict key objects
üst
89e54338
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
NEWS
Misc/NEWS
+3
-0
dictobject.c
Objects/dictobject.c
+3
-3
No files found.
Misc/NEWS
Dosyayı görüntüle @
ce5179fc
...
@@ -18,6 +18,9 @@ Core and Builtins
...
@@ -18,6 +18,9 @@ Core and Builtins
by external AST optimizers, but the compiler does not emit directly such
by external AST optimizers, but the compiler does not emit directly such
node.
node.
- Issue #23601: Sped-up allocation of dict key objects by using Python'
s
small
object
allocator
.
(
Contributed
by
Julian
Taylor
.)
-
Issue
#
18018
:
Import
raises
ImportError
instead
of
SystemError
if
a
relative
-
Issue
#
18018
:
Import
raises
ImportError
instead
of
SystemError
if
a
relative
import
is
attempted
without
a
known
parent
package
.
import
is
attempted
without
a
known
parent
package
.
...
...
Objects/dictobject.c
Dosyayı görüntüle @
ce5179fc
...
@@ -324,7 +324,7 @@ static PyDictKeysObject *new_keys_object(Py_ssize_t size)
...
@@ -324,7 +324,7 @@ static PyDictKeysObject *new_keys_object(Py_ssize_t size)
assert
(
size
>=
PyDict_MINSIZE_SPLIT
);
assert
(
size
>=
PyDict_MINSIZE_SPLIT
);
assert
(
IS_POWER_OF_2
(
size
));
assert
(
IS_POWER_OF_2
(
size
));
dk
=
Py
Mem
_MALLOC
(
sizeof
(
PyDictKeysObject
)
+
dk
=
Py
Object
_MALLOC
(
sizeof
(
PyDictKeysObject
)
+
sizeof
(
PyDictKeyEntry
)
*
(
size
-
1
));
sizeof
(
PyDictKeyEntry
)
*
(
size
-
1
));
if
(
dk
==
NULL
)
{
if
(
dk
==
NULL
)
{
PyErr_NoMemory
();
PyErr_NoMemory
();
...
@@ -353,7 +353,7 @@ free_keys_object(PyDictKeysObject *keys)
...
@@ -353,7 +353,7 @@ free_keys_object(PyDictKeysObject *keys)
Py_XDECREF
(
entries
[
i
].
me_key
);
Py_XDECREF
(
entries
[
i
].
me_key
);
Py_XDECREF
(
entries
[
i
].
me_value
);
Py_XDECREF
(
entries
[
i
].
me_value
);
}
}
Py
Mem
_FREE
(
keys
);
Py
Object
_FREE
(
keys
);
}
}
#define new_values(size) PyMem_NEW(PyObject *, size)
#define new_values(size) PyMem_NEW(PyObject *, size)
...
@@ -964,7 +964,7 @@ dictresize(PyDictObject *mp, Py_ssize_t minused)
...
@@ -964,7 +964,7 @@ dictresize(PyDictObject *mp, Py_ssize_t minused)
}
}
}
}
assert
(
oldkeys
->
dk_refcnt
==
1
);
assert
(
oldkeys
->
dk_refcnt
==
1
);
DK_DEBUG_DECREF
Py
Mem
_FREE
(
oldkeys
);
DK_DEBUG_DECREF
Py
Object
_FREE
(
oldkeys
);
}
}
return
0
;
return
0
;
}
}
...
...
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