Suche senden
Hochladen
Dive into CPython Bytecode
•
Als ODP, PDF herunterladen
•
1 gefällt mir
•
1,895 views
Alex Gaynor
Folgen
My slides from my 2009 DjangoCon lightning talk on CPython bytecode.
Weniger lesen
Mehr lesen
Technologie
Sport
Melden
Teilen
Melden
Teilen
1 von 23
Jetzt herunterladen
Empfohlen
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
Empfohlen
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
Weitere ähnliche Inhalte
Was ist angesagt?
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
Was ist angesagt?
(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
Ähnlich wie 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
Ähnlich wie 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
Kürzlich hochgeladen
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
Remote DBA Services
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
The Digital Insurer
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
Andrey Devyatkin
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
apidays
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Edi Saputra
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
lior mazor
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Drew Madelung
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
apidays
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc
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
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
MadyBayot
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
Zilliz
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Jeffrey Haguewood
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
apidays
Architecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
Khushali Kathiriya
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
apidays
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
Dropbox
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
Zilliz
Kürzlich hochgeladen
(20)
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
Architecting Cloud Native Applications
Architecting Cloud Native Applications
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
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
Jetzt herunterladen