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
186c30b7
Kaydet (Commit)
186c30b7
authored
Şub 06, 2016
tarafından
Yury Selivanov
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #26288: Optimize PyLong_AsDouble.
üst
eb588a1d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
NEWS
Misc/NEWS
+1
-0
longobject.c
Objects/longobject.c
+7
-0
No files found.
Misc/NEWS
Dosyayı görüntüle @
186c30b7
...
@@ -165,6 +165,7 @@ Core and Builtins
...
@@ -165,6 +165,7 @@ Core and Builtins
-
Issue
#
25660
:
Fix
TAB
key
behaviour
in
REPL
with
readline
.
-
Issue
#
25660
:
Fix
TAB
key
behaviour
in
REPL
with
readline
.
-
Issue
#
26288
:
Optimize
PyLong_AsDouble
.
Library
Library
-------
-------
...
...
Objects/longobject.c
Dosyayı görüntüle @
186c30b7
...
@@ -2769,6 +2769,13 @@ PyLong_AsDouble(PyObject *v)
...
@@ -2769,6 +2769,13 @@ PyLong_AsDouble(PyObject *v)
PyErr_SetString
(
PyExc_TypeError
,
"an integer is required"
);
PyErr_SetString
(
PyExc_TypeError
,
"an integer is required"
);
return
-
1
.
0
;
return
-
1
.
0
;
}
}
if
(
Py_ABS
(
Py_SIZE
(
v
))
<=
1
)
{
/* Fast path; single digit will always fit decimal.
This improves performance of FP/long operations by at
least 20%. This is even visible on macro-benchmarks.
*/
return
(
double
)
MEDIUM_VALUE
((
PyLongObject
*
)
v
);
}
x
=
_PyLong_Frexp
((
PyLongObject
*
)
v
,
&
exponent
);
x
=
_PyLong_Frexp
((
PyLongObject
*
)
v
,
&
exponent
);
if
((
x
==
-
1
.
0
&&
PyErr_Occurred
())
||
exponent
>
DBL_MAX_EXP
)
{
if
((
x
==
-
1
.
0
&&
PyErr_Occurred
())
||
exponent
>
DBL_MAX_EXP
)
{
PyErr_SetString
(
PyExc_OverflowError
,
PyErr_SetString
(
PyExc_OverflowError
,
...
...
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