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
9cb41dfb
Kaydet (Commit)
9cb41dfb
authored
Ara 03, 2011
tarafından
Antoine Pitrou
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Remove references to psyco, which is mostly unmaintained and doesn't work with Python 3.
üst
5dd95d6f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
18 deletions
+4
-18
extending.rst
Doc/faq/extending.rst
+1
-7
programming.rst
Doc/faq/programming.rst
+3
-11
No files found.
Doc/faq/extending.rst
Dosyayı görüntüle @
9cb41dfb
...
...
@@ -37,13 +37,7 @@ Writing C is hard; are there any alternatives?
There are a number of alternatives to writing your own C extensions, depending
on what you're trying to do.
.. XXX make sure these all work; mention Cython
If you need more speed, `Psyco <http://psyco.sourceforge.net/>`_ generates x86
assembly code from Python bytecode. You can use Psyco to compile the most
time-critical functions in your code, and gain a significant improvement with
very little effort, as long as you're running on a machine with an
x86-compatible processor.
.. XXX make sure these all work
`Cython <http://cython.org>`_ and its relative `Pyrex
<http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/>`_ are compilers
...
...
Doc/faq/programming.rst
Dosyayı görüntüle @
9cb41dfb
...
...
@@ -121,19 +121,11 @@ My program is too slow. How do I speed it up?
That's a tough one, in general. There are many tricks to speed up Python code;
consider rewriting parts in C as a last resort.
In some cases it's possible to automatically translate Python to C or x86
assembly language, meaning that you don't have to modify your code to gain
increased speed.
.. XXX seems to have overlap with other questions!
`Cython <http://cython.org>`_ and `Pyrex <http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/>`_
can compile a slightly modified version of Python code into a C extension, and
can be used on many different platforms.
`Psyco <http://psyco.sourceforge.net>`_ is a just-in-time compiler that
translates Python code into x86 assembly language. If you can use it, Psyco can
provide dramatic speedups for critical functions.
can be used on many different platforms. Depending on your code, Cython
may be able to make it significantly faster than when run by the Python
interpreter.
The rest of this answer will discuss various tricks for squeezing a bit more
speed out of Python code. *Never* apply any optimization tricks unless you know
...
...
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