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
複雑なState管理からの脱却
sansantech
PRO
1
140
TypeScriptの次なる大進化なるか!? 条件型を返り値とする関数の型推論
uhyo
2
1.6k
誰も全体を知らない ~ ロールの垣根を超えて引き上げる開発生産性 / Boosting Development Productivity Across Roles
kakehashi
1
220
エンジニア人生の拡張性を高める 「探索型キャリア設計」の提案
tenshoku_draft
1
120
AGIについてChatGPTに聞いてみた
blueb
0
130
TypeScript、上達の瞬間
sadnessojisan
46
13k
New Relicを活用したSREの最初のステップ / NRUG OKINAWA VOL.3
isaoshimizu
2
590
社内で最大の技術的負債のリファクタリングに取り組んだお話し
kidooonn
1
550
初心者向けAWS Securityの勉強会mini Security-JAWSを9ヶ月ぐらい実施してきての近況
cmusudakeisuke
0
120
これまでの計測・開発・デプロイ方法全部見せます! / Findy ISUCON 2024-11-14
tohutohu
3
370
スクラムチームを立ち上げる〜チーム開発で得られたもの・得られなかったもの〜
ohnoeight
2
350
rootlessコンテナのすゝめ - 研究室サーバーでもできる安全なコンテナ管理
kitsuya0828
3
380
Featured
See All Featured
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
BBQ
matthewcrist
85
9.3k
Done Done
chrislema
181
16k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.3k
Into the Great Unknown - MozCon
thekraken
32
1.5k
The World Runs on Bad Software
bkeepers
PRO
65
11k
4 Signs Your Business is Dying
shpigford
180
21k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
Unsuck your backbone
ammeep
668
57k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
720
Intergalactic Javascript Robots from Outer Space
tanoku
269
27k
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