Skip to Content
Python ad alte prestazioni, 2a edizione
book

Python ad alte prestazioni, 2a edizione

by Micha Gorelick, Ian Ozsvald
April 2025
Intermediate to advanced
468 pages
14h 8m
Italian
O'Reilly Media, Inc.
Book available
Content preview from Python ad alte prestazioni, 2a edizione

Capitolo 7. Compilazione in C

Questo lavoro è stato tradotto utilizzando l'AI. Siamo lieti di ricevere il tuo feedback e i tuoi commenti: translation-feedback@oreilly.com

Il modo più semplice per far girare il tuo codice più velocemente è fargli fare meno lavoro. Supponendo che tu abbia già scelto dei buoni algoritmi e che tu abbia ridotto la quantità di dati da elaborare, il modo più semplice per eseguire meno istruzioni è compilare il tuo codice in codice macchina.

Python offre diverse opzioni, tra cui approcci di compilazione basati sul C puro come Cython; compilazione basata su LLVM tramite Numba; e la macchina virtuale sostitutiva PyPy, che include un compilatore just-in-time (JIT) integrato. Al momento di decidere quale strada intraprendere, è necessario bilanciare i requisiti di adattabilità del codice e di velocità del team.

Ognuno di questi strumenti aggiunge una nuova dipendenza alla tua toolchain e Cython richiede che tu scriva in un nuovo tipo di linguaggio (un ibrido ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

What Employees Want Most in Uncertain Times

What Employees Want Most in Uncertain Times

Kristine W. Powers, Jessica B.B. Diaz
What Successful Project Managers Do

What Successful Project Managers Do

W. Scott Cameron, Jeffrey S. Russell, Edward J. Hoffman, Alexander Laufer
How to Become a Game-Changing Leader

How to Become a Game-Changing Leader

Douglas A. Ready, Alan Mulally

Publisher Resources

ISBN: 9798341644632Supplemental Content