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
pypy - o interpretador mais rapido do velho oeste
Search
Andrews Medina
October 05, 2013
Technology
0
360
pypy - o interpretador mais rapido do velho oeste
Palestra sobre pypy apresentada na pythonbrasil[9].
Andrews Medina
October 05, 2013
Tweet
Share
More Decks by Andrews Medina
See All by Andrews Medina
Organizando dados juŕidicos em grafos
andrewsmedina
0
90
Clean Code - princípios e práticas para um código sustentável
andrewsmedina
0
560
Pytfalls
andrewsmedina
1
180
tsuru para quem sabe tsuru
andrewsmedina
0
71
globo.com s2 python
andrewsmedina
5
360
tsuru and docker
andrewsmedina
6
3.5k
fazendo deploys de forma simples e divertida com tsuru
andrewsmedina
3
140
let's go
andrewsmedina
2
300
TDD for Dummies
andrewsmedina
3
360
Other Decks in Technology
See All in Technology
OTelCol_TailSampling_and_SpanMetrics
gumamon
1
200
AIチャットボット開発への生成AI活用
ryomrt
0
170
New Relicを活用したSREの最初のステップ / NRUG OKINAWA VOL.3
isaoshimizu
3
630
強いチームと開発生産性
onk
PRO
35
11k
Amazon CloudWatch Network Monitor のススメ
yuki_ink
1
210
マルチプロダクトな開発組織で 「開発生産性」に向き合うために試みたこと / Improving Multi-Product Dev Productivity
sugamasao
1
310
iOSチームとAndroidチームでブランチ運用が違ったので整理してます
sansantech
PRO
0
150
AWS Lambdaと歩んだ“サーバーレス”と今後 #lambda_10years
yoshidashingo
1
180
Security-JAWS【第35回】勉強会クラウドにおけるマルウェアやコンテンツ改ざんへの対策
4su_para
0
180
Why App Signing Matters for Your Android Apps - Android Bangkok Conference 2024
akexorcist
0
130
リンクアンドモチベーション ソフトウェアエンジニア向け紹介資料 / Introduction to Link and Motivation for Software Engineers
lmi
4
300k
【Startup CTO of the Year 2024 / Audience Award】アセンド取締役CTO 丹羽健
niwatakeru
0
1.3k
Featured
See All Featured
Six Lessons from altMBA
skipperchong
27
3.5k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.7k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
A Philosophy of Restraint
colly
203
16k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.2k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Why Our Code Smells
bkeepers
PRO
334
57k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
Transcript
globo .com pypy o interpretador mais rápido do velho oeste
Saturday, October 5, 13
Saturday, October 5, 13
‣ djangobrasil ‣ globo.com desde 2008 ‣ splinter ‣ tsuru
@andrewsmedina Saturday, October 5, 13
‣ sabe o que é? ‣ sabe o que é
rpython? ‣ já usou pypy? ‣ já usou rpython? pypy? Saturday, October 5, 13
‣ rpython ‣ pypy ‣ mitos ‣ como contribuir cronograma
Saturday, October 5, 13
rpython Saturday, October 5, 13
‣ quem já teve vontade de escrever um compilador/ interpretador?
‣ que já implementou um? ? Saturday, October 5, 13
‣ python subset ‣ traduz rpython para c ‣ ferramenta
para escrever interpretadores rpython Saturday, October 5, 13
‣ sintaxe x implementação x backend ‣ js x jit
x c ‣ ruby x gc mark sweep x c ‣ ruby x jit x jvm rpython Saturday, October 5, 13
‣ pypy ‣ topaz ‣ lang-js ‣ lang-scheme ‣ lang-smaltalk
‣ pygirl (gameboy) ‣ lang-io ‣ hippy interpretadores Saturday, October 5, 13
pypy Saturday, October 5, 13
‣ performance ‣ eficiência ‣ compatibilidade com cPython pypy Saturday,
October 5, 13
performance Saturday, October 5, 13
‣ python 2.7.3 ‣ algumas coisas em rpython compatibilidade Saturday,
October 5, 13
‣ efeito colateral por escrever python em python interpretador level
vs app level Saturday, October 5, 13
app level Saturday, October 5, 13
interpretador level Saturday, October 5, 13
compatibilidade Saturday, October 5, 13
‣ navite code > bytecode ‣ compilação do bytecode ‣
“esquentar o interpretador” jit Saturday, October 5, 13
def f2(x, y): x = hint(x, promote=True) z = x
* 2 + 1 return z + y jit Saturday, October 5, 13
guard(x == 4) v1 = x * 2 z =
v1 + 1 v2 = z + y return(v2) jit Saturday, October 5, 13
guard(x == 4) v2 = 9 + y return(v2) jit
Saturday, October 5, 13
‣ cPython: reference counting ‣ pypy: minimark garbage collector Saturday,
October 5, 13
class B(object): def __del__(self): print "oie" garbage collector Saturday, October
5, 13
>>>> b = B() >>>> b = 1 >>>> garbage
collector - pypy Saturday, October 5, 13
>>> b = B() >>> b = 1 oie garbage
collector - cPython Saturday, October 5, 13
b = B() a = B() b.x = a a.x
= b garbage collector Saturday, October 5, 13
‣ executar c no python ‣ pip install cffi cffi
Saturday, October 5, 13
cffi Saturday, October 5, 13
‣ concorrencia ‣ inspirado pelo http://www.stackless.com/ ‣ http://greenlet.readthedocs.org/en/latest/ stackless Saturday,
October 5, 13
‣ paralelismo ‣ baseado em banco de dados stm Saturday,
October 5, 13
‣ escrito em rpython ‣ já funciona :) ‣ http://buildbot.pypy.org/numpy-status/latest.html
numpy + pypy Saturday, October 5, 13
>>>> import numpypy >>>> numpypy.array([1,2,3]) array([1, 2, 3]) >>>> numpy
+ pypy Saturday, October 5, 13
numpy + pypy ‣ 231/559 names ‣ 131/161 ndarray attributes
‣ 34/48 dtype attributes ‣ 63/134 generic attributes ‣ 28/32 flatiter attribute Saturday, October 5, 13
mitos Saturday, October 5, 13
integração com c Saturday, October 5, 13
‣ funciona com ctypes (mysqldb) ‣ cffi integração com c
Saturday, October 5, 13
‣ funciona com ctypes (mysqldb) ‣ cffi integração com c
Saturday, October 5, 13
python3 Saturday, October 5, 13
python3 Saturday, October 5, 13
python3 Saturday, October 5, 13
6x mais rápido que cPython Saturday, October 5, 13
6x mais rápido que cPython Saturday, October 5, 13
6x mais rápido que cPython Saturday, October 5, 13
6x mais rápido que cPython Saturday, October 5, 13
compilar pypy demora Saturday, October 5, 13
compilar pypy demora Saturday, October 5, 13
compilar pypy demora Saturday, October 5, 13
compilar pypy demora Saturday, October 5, 13
compilar pypy demora Saturday, October 5, 13
‣ pypy.org ‣ virtualenv ‣ testes ‣ benchmarks como começar
Saturday, October 5, 13
‣ bugs.pypy.org ‣ https://bitbucket.org/pypy/pypy ‣ http://doc.pypy.org ‣ doações (stm, numpy,
python3) como contribuir Saturday, October 5, 13
obrigado! @andrewsmedina Saturday, October 5, 13