Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Python for Java developers
Search
Javier Honduvilla Coto
November 24, 2014
Programming
0
79
Python for Java developers
Javier Honduvilla Coto
November 24, 2014
Tweet
Share
More Decks by Javier Honduvilla Coto
See All by Javier Honduvilla Coto
Debugging – Learning Linux @ Facebook
javierhonduco
0
84
Understanding Ruby with BPF
javierhonduco
1
36
Spying Linux processes
javierhonduco
0
95
word2vec
javierhonduco
0
64
UC3M university cafeteria redesign
javierhonduco
0
83
Mac OSX UI toolkit and design guidelines
javierhonduco
0
120
Other Decks in Programming
See All in Programming
マイコンでもRustのtestがしたい/KernelVM Kansai 11
tnishinaga
1
890
MySQL初心者が311個のカラムにNot NULL制約を追加していってALTER TABLEについて学んだ話
hatsu38
2
140
Boost Your Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
880
OpenTelemetry + LLM = OpenLLMetry!?
yunosukey
1
130
カウシェで Four Keys の改善を試みた理由
ike002jp
1
140
20250426 GDGoC 合同新歓 - GDGoC のススメ
getty708
0
110
Instrumentsを使用した アプリのパフォーマンス向上方法
hinakko
0
250
Cloudflare Workersで進めるリモートMCP活用
syumai
5
580
ComposeでのPicture in Picture
takathemax
0
140
Beyond_the_Prompt__Evaluating__Testing__and_Securing_LLM_Applications.pdf
meteatamel
0
110
エンジニア向けCursor勉強会 @ SmartHR
yukisnow1823
3
12k
The New Developer Workflow: How AI Transforms Ideas into Code
danielsogl
0
120
Featured
See All Featured
Git: the NoSQL Database
bkeepers
PRO
430
65k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
105
19k
The Invisible Side of Design
smashingmag
299
50k
Testing 201, or: Great Expectations
jmmastey
42
7.5k
GitHub's CSS Performance
jonrohan
1031
460k
Building Better People: How to give real-time feedback that sticks.
wjessup
368
19k
A Tale of Four Properties
chriscoyier
159
23k
Rebuilding a faster, lazier Slack
samanthasiow
81
9k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.2k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
For a Future-Friendly Web
brad_frost
177
9.7k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.7k
Transcript
Can I haz ur pythons? Rafael Medina García @rmed_dev Fco.
Javier Honduvilla Coto @javierhonduco
Where is python?
Examples for the Java weenies
Simple TCP Socket: Java
Simple TCP Socket: Python
Reading a file: Java
Reading a file: Python
Hashtable: Java
“Hashtable”: Python
Why python rocks? • Function parameters • GC ◦ Reference
counting • Decorators • Types (WTF) • List-Stack-Queue-[...] • PyPI
Concurrency is not parallelism • Concurrency ◦ GIL: Global Interpreter
Lock (</3) i. threads vs processes • celery ii. tasks iii. groups iv. pipes • cpython, pypy
Celery • Async framework task Queue + Tasks = fun
Cpython and moar • cpython ◦ Guido’s Python Interpreter •
pypy ◦ “an implementation of the Python programming language written in Python itself”
Web frameworks + wsgi • Django • Flask • ∞
Scientific packages • ipython + notebook • cython • numba...
Our fav libs • requests (http for humans) • SQLAlchemy
(database toolkit)
SQLAlchemy I
SQLAlchemy II
Is (c)python slow? • Overhead • Cache misses • Complex
data structures • Any variable can change its type • (dynamic)
None
Bibliography • https://jakevdp.github.io/blog/2014/05/09/why-python-is- slow/ • http://docs.python-requests.org/en/latest/ • https://bitbucket.org/zzzeek/sqlalchemy • http://wsgi.readthedocs.org/en/latest/
• http://www.dabeaz.com/python/UnderstandingGIL.pdf • https://docs.python.org/2/library/gc.html • https://pypi.python.org/pypi • http://pypy.org/ • http://www.scipy.org/