Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
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
Amazon Forecast亡き今、我々がマネージドサービスに頼らず時系列予測を実行する方法
sadynitro
0
210
GAS × Discord bot × Gemini で作ったさいきょーの情報収集ツール
ysknsid25
1
230
SDN の Hype Cycle を一通り経験してみて思うこと / Going through the Hype Cycle of SDN
mshindo
3
340
Amazon ECSとCloud Runの相互理解で広げるクラウドネイティブの景色 / Mutually understanding Amazon ECS and Cloud Run
iselegant
18
2.1k
Nutanixにいらっしゃいませ。Moveと仮想マシン移行のポイント紹介
shadowhat
0
120
Engineer Recruting Deck
siva_official
PRO
1
3.1k
日本全国・都市3D化プロジェクト「PLATEAU」とデータ変換OSS「PLATEAU GIS Converter」の公開
nokonoko1203
2
250
プルリクが全てじゃない!実は喜ばれるOSS貢献の方法8選
tkikuc
14
1.6k
B11-SharePoint サイトのストレージ管理を考えよう
maekawa123
0
110
Kubernetesを知る
logica0419
9
760
140年の歴史あるエンタープライズ企業の内製化×マイクロサービス化への航海
yussugi
0
3.3k
GDGoC開発体験談 - Gemini生成AI活用ハッカソン / GASとFirebaseで挑むパン屋のフードロス解決 -
hotekagi
1
280
Featured
See All Featured
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
16
2.2k
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
Being A Developer After 40
akosma
87
590k
Faster Mobile Websites
deanohume
305
30k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
131
33k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
A Philosophy of Restraint
colly
203
16k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
Designing for humans not robots
tammielis
250
25k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
Facilitating Awesome Meetings
lara
50
6.1k
Ruby is Unlike a Banana
tanoku
97
11k
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