Enviar pesquisa
Carregar
Dive into CPython Bytecode
•
Transferir como ODP, PDF
•
1 gostou
•
1,895 visualizações
Alex Gaynor
Seguir
My slides from my 2009 DjangoCon lightning talk on CPython bytecode.
Leia menos
Leia mais
Tecnologia
Esportes
Denunciar
Compartilhar
Denunciar
Compartilhar
1 de 23
Baixar agora
Recomendados
Python with a SWIG of c++
Python with a SWIG of c++
bobmcn
tokyotalk
tokyotalk
Hiroshi Ono
Código para Latch físico: Touch_calibrate.py
Código para Latch físico: Touch_calibrate.py
Chema Alonso
.Net 4.0 Threading and Parallel Programming
.Net 4.0 Threading and Parallel Programming
Alex Moore
Strings1
Strings1
Michael Gordon
Hello world program
Hello world program
Spy Seat
python gil
python gil
rfyiamcool
1.3 core programming [identify the appropriate method for handling repetition]
1.3 core programming [identify the appropriate method for handling repetition]
tototo147
Recomendados
Python with a SWIG of c++
Python with a SWIG of c++
bobmcn
tokyotalk
tokyotalk
Hiroshi Ono
Código para Latch físico: Touch_calibrate.py
Código para Latch físico: Touch_calibrate.py
Chema Alonso
.Net 4.0 Threading and Parallel Programming
.Net 4.0 Threading and Parallel Programming
Alex Moore
Strings1
Strings1
Michael Gordon
Hello world program
Hello world program
Spy Seat
python gil
python gil
rfyiamcool
1.3 core programming [identify the appropriate method for handling repetition]
1.3 core programming [identify the appropriate method for handling repetition]
tototo147
LCDS - State Presentation
LCDS - State Presentation
Ruochun Tzeng
Introduction to nand2 tetris
Introduction to nand2 tetris
Yodalee
Q4.11: NEON Intrinsics
Q4.11: NEON Intrinsics
Linaro
Certifying (RISC) Machine Code Safe from Aliasing (OpenCert 2013)
Certifying (RISC) Machine Code Safe from Aliasing (OpenCert 2013)
Peter Breuer
Parallel Computing Example with Raspberry Pi Cluster
Parallel Computing Example with Raspberry Pi Cluster
Herpiko Dwi Aguno
Introduction to RevKit
Introduction to RevKit
Mathias Soeken
Exercice.docx
Exercice.docx
imane26
How to make the Fastest C# Serializer, In the case of ZeroFormatter
How to make the Fastest C# Serializer, In the case of ZeroFormatter
Yoshifumi Kawai
异步io框架的实现
异步io框架的实现
rfyiamcool
Rubinius @ RubyAndRails2010
Rubinius @ RubyAndRails2010
Dirkjan Bussink
Custard pi 7 user information
Custard pi 7 user information
Seggy Segaran
Assembly language part I
Assembly language part I
Mohammed A. Imran
Introduction to cython
Introduction to cython
John(Qiang) Zhang
Faster Python, FOSDEM
Faster Python, FOSDEM
Victor Stinner
LED Blinking Using Raspberry Pi
LED Blinking Using Raspberry Pi
Arjun R Krishna
Why is a[1] fast than a.get(1)
Why is a[1] fast than a.get(1)
kao kuo-tung
Sol7
Sol7
University Of Lahore
Format String Vulnerability
Format String Vulnerability
Jian-Yu Li
C coroutine
C coroutine
Chien-Wei Huang
pdb like a pro
pdb like a pro
Philip Bauer
Protostar VM - Heap3
Protostar VM - Heap3
UTD Computer Security Group
C++ Code as Seen by a Hypercritical Reviewer
C++ Code as Seen by a Hypercritical Reviewer
Andrey Karpov
Mais conteúdo relacionado
Mais procurados
LCDS - State Presentation
LCDS - State Presentation
Ruochun Tzeng
Introduction to nand2 tetris
Introduction to nand2 tetris
Yodalee
Q4.11: NEON Intrinsics
Q4.11: NEON Intrinsics
Linaro
Certifying (RISC) Machine Code Safe from Aliasing (OpenCert 2013)
Certifying (RISC) Machine Code Safe from Aliasing (OpenCert 2013)
Peter Breuer
Parallel Computing Example with Raspberry Pi Cluster
Parallel Computing Example with Raspberry Pi Cluster
Herpiko Dwi Aguno
Introduction to RevKit
Introduction to RevKit
Mathias Soeken
Exercice.docx
Exercice.docx
imane26
How to make the Fastest C# Serializer, In the case of ZeroFormatter
How to make the Fastest C# Serializer, In the case of ZeroFormatter
Yoshifumi Kawai
异步io框架的实现
异步io框架的实现
rfyiamcool
Rubinius @ RubyAndRails2010
Rubinius @ RubyAndRails2010
Dirkjan Bussink
Custard pi 7 user information
Custard pi 7 user information
Seggy Segaran
Assembly language part I
Assembly language part I
Mohammed A. Imran
Introduction to cython
Introduction to cython
John(Qiang) Zhang
Faster Python, FOSDEM
Faster Python, FOSDEM
Victor Stinner
LED Blinking Using Raspberry Pi
LED Blinking Using Raspberry Pi
Arjun R Krishna
Why is a[1] fast than a.get(1)
Why is a[1] fast than a.get(1)
kao kuo-tung
Sol7
Sol7
University Of Lahore
Format String Vulnerability
Format String Vulnerability
Jian-Yu Li
C coroutine
C coroutine
Chien-Wei Huang
pdb like a pro
pdb like a pro
Philip Bauer
Mais procurados
(20)
LCDS - State Presentation
LCDS - State Presentation
Introduction to nand2 tetris
Introduction to nand2 tetris
Q4.11: NEON Intrinsics
Q4.11: NEON Intrinsics
Certifying (RISC) Machine Code Safe from Aliasing (OpenCert 2013)
Certifying (RISC) Machine Code Safe from Aliasing (OpenCert 2013)
Parallel Computing Example with Raspberry Pi Cluster
Parallel Computing Example with Raspberry Pi Cluster
Introduction to RevKit
Introduction to RevKit
Exercice.docx
Exercice.docx
How to make the Fastest C# Serializer, In the case of ZeroFormatter
How to make the Fastest C# Serializer, In the case of ZeroFormatter
异步io框架的实现
异步io框架的实现
Rubinius @ RubyAndRails2010
Rubinius @ RubyAndRails2010
Custard pi 7 user information
Custard pi 7 user information
Assembly language part I
Assembly language part I
Introduction to cython
Introduction to cython
Faster Python, FOSDEM
Faster Python, FOSDEM
LED Blinking Using Raspberry Pi
LED Blinking Using Raspberry Pi
Why is a[1] fast than a.get(1)
Why is a[1] fast than a.get(1)
Sol7
Sol7
Format String Vulnerability
Format String Vulnerability
C coroutine
C coroutine
pdb like a pro
pdb like a pro
Semelhante a Dive into CPython Bytecode
Protostar VM - Heap3
Protostar VM - Heap3
UTD Computer Security Group
C++ Code as Seen by a Hypercritical Reviewer
C++ Code as Seen by a Hypercritical Reviewer
Andrey Karpov
Creating your own Abstract Processor
Creating your own Abstract Processor
Aodrulez
Python Compiler Internals Presentation Slides
Python Compiler Internals Presentation Slides
Tom Lee
Diving into byte code optimization in python
Diving into byte code optimization in python
Chetan Giridhar
Such a weird Processor: messing with opcodes (...and a little bit of PE) (Has...
Such a weird Processor: messing with opcodes (...and a little bit of PE) (Has...
Ange Albertini
Working with Bytecode
Working with Bytecode
Marcus Denker
vJUG Getting C C++ performance out of java
vJUG Getting C C++ performance out of java
C24 Technologies
A 64-bit horse that can count
A 64-bit horse that can count
Andrey Karpov
The article is a report about testing of portability of Loki library with 64-...
The article is a report about testing of portability of Loki library with 64-...
PVS-Studio
[JSDC 2016] Codex: Conditional Modules Strike Back
[JSDC 2016] Codex: Conditional Modules Strike Back
Alex Liu
Python 3000
Python 3000
Bob Chao
Optimization in the world of 64-bit errors
Optimization in the world of 64-bit errors
PVS-Studio
Compose Code Camp (1).pptx
Compose Code Camp (1).pptx
MadheswarKonidela
Devoxx MA 2015 - Turn you java objects into binary
Devoxx MA 2015 - Turn you java objects into binary
C24 Technologies
PostgreSQL as seen by Rubyists (Kaigi on Rails 2022)
PostgreSQL as seen by Rubyists (Kaigi on Rails 2022)
Андрей Новиков
Cpp17 and Beyond
Cpp17 and Beyond
ComicSansMS
x86 & PE
x86 & PE
Ange Albertini
There are two types of ciphers - Block and Stream. Block is used to .docx
There are two types of ciphers - Block and Stream. Block is used to .docx
relaine1
The CppCat Analyzer Checks TortoiseGit
The CppCat Analyzer Checks TortoiseGit
Andrey Karpov
Semelhante a Dive into CPython Bytecode
(20)
Protostar VM - Heap3
Protostar VM - Heap3
C++ Code as Seen by a Hypercritical Reviewer
C++ Code as Seen by a Hypercritical Reviewer
Creating your own Abstract Processor
Creating your own Abstract Processor
Python Compiler Internals Presentation Slides
Python Compiler Internals Presentation Slides
Diving into byte code optimization in python
Diving into byte code optimization in python
Such a weird Processor: messing with opcodes (...and a little bit of PE) (Has...
Such a weird Processor: messing with opcodes (...and a little bit of PE) (Has...
Working with Bytecode
Working with Bytecode
vJUG Getting C C++ performance out of java
vJUG Getting C C++ performance out of java
A 64-bit horse that can count
A 64-bit horse that can count
The article is a report about testing of portability of Loki library with 64-...
The article is a report about testing of portability of Loki library with 64-...
[JSDC 2016] Codex: Conditional Modules Strike Back
[JSDC 2016] Codex: Conditional Modules Strike Back
Python 3000
Python 3000
Optimization in the world of 64-bit errors
Optimization in the world of 64-bit errors
Compose Code Camp (1).pptx
Compose Code Camp (1).pptx
Devoxx MA 2015 - Turn you java objects into binary
Devoxx MA 2015 - Turn you java objects into binary
PostgreSQL as seen by Rubyists (Kaigi on Rails 2022)
PostgreSQL as seen by Rubyists (Kaigi on Rails 2022)
Cpp17 and Beyond
Cpp17 and Beyond
x86 & PE
x86 & PE
There are two types of ciphers - Block and Stream. Block is used to .docx
There are two types of ciphers - Block and Stream. Block is used to .docx
The CppCat Analyzer Checks TortoiseGit
The CppCat Analyzer Checks TortoiseGit
Último
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Neo4j
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
The Digital Insurer
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
HampshireHUG
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
Sinan KOZAK
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
Slack Application Development 101 Slides
Slack Application Development 101 Slides
praypatel2
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
Safe Software
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
hans926745
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
The Digital Insurer
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
Results
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
Allon Mureinik
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
Radu Cotescu
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
Rafal Los
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
wesley chun
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
Delhi Call girls
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
Anna Loughnan Colquhoun
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Miguel Araújo
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
Delhi Call girls
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Igalia
Último
(20)
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
Slack Application Development 101 Slides
Slack Application Development 101 Slides
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Dive into CPython Bytecode
1.
Dive into CPython
Bytecode Alex Gaynor
2.
I don't need
to know that stuff
3.
You don't.
But it's totally helpful.
4.
How does CPython
Make Bytecode?
5.
Tokenize the source
6.
Parse the tokens
into an AST
7.
Build a symbol
table to figure out what's a global
8.
Compile to bytecode
9.
Now I can
haz bytecode
10.
Now that I
has a bytecode how does I see it?
11.
>>> def f(o):
... return o >>> import dis >>> dis.dis(f) 2 0 LOAD_FAST 0 (o) 3 RETURN_VALUE
12.
So use the
dis module
13.
So now that
we have bytecode, what do we do with it?
14.
Well, what are
those bytecodes?
15.
16.
Python VM is
stack based
17.
So now we
know some bytecodes, what can we do with this knowledge
18.
19.
20.
21.
Less Bytecode ==
faster!
22.
More specialized bytecodes
== faster
23.
@alex_gaynor Thanks
Baixar agora