Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Topaz is Ruby in Python
Search
Jan Stępień
June 12, 2013
Programming
600
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Topaz is Ruby in Python
Slides from a talk about Topaz I delivered on 12.06.2013 at Munich Ruby Users Group meetup.
Jan Stępień
June 12, 2013
More Decks by Jan Stępień
See All by Jan Stępień
graalvm-jug-bb
jan
1
270
That Looks Oddly Familiar
jan
0
510
Native Clojure
jan
0
290
Native Clojure with GraalVM
jan
0
820
Compiling a lisp into a lisp using a lisp
jan
0
200
Mutation testing in continuous delivery pipelines
jan
0
230
Self-contained systems: an introduction
jan
0
280
Let's just test that real quick
jan
1
480
Combating spam, or how I befriended the Killer Rabbit of Caerbannog
jan
0
340
Other Decks in Programming
See All in Programming
Security issues being discussed on Web Platforms
petamoriken
0
1.3k
SONY CISC-NEWS NWS-1750 + NWB-225 フレームバッファの NetBSD/news68k ドライバ実装 / OSC2026Hiroshima
tsutsui
0
150
JPUG勉強会 OSSデータベースの内部構造を理解しよう(第2回)
oga5
0
280
AgentCore CLI で進化した AWS での AI エージェントの作り方 : 必要な機能を必要な時に
icoxfog417
PRO
3
390
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
360
個人開発基盤をまるごとCloudflareに引っ越して爆速で総合的体験を向上させた話
tinykitten
0
210
Java 27新機能 / Java 27 new features
kishida
2
180
フロントエンドUIフレームワークのこれまでとこれから
ssssota
5
3k
AI活用は、個人から組織へ|マルチプレイヤーエージェントハーネス「QM」の社内活用事例 / AI use is moving from individuals to orgs
rkaga
1
290
【高い買い物LT会】初任給で話題の国産フィジカルAIを買った話
akagami
PRO
0
170
KiroのSpecで「五目並べ」を作ってみる
satoshi256kbyte
1
280
Webの地図
yosuke_furukawa
PRO
6
4.9k
Featured
See All Featured
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.9k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
420
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
1
540
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.3k
Facilitating Awesome Meetings
lara
57
7.2k
How to Ace a Technical Interview
jacobian
281
24k
Exploring anti-patterns in Rails
aemeredith
4
520
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
31k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
440
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
340
Rails Girls Zürich Keynote
gr2m
96
14k
Transcript
Topaz is in Ruby Python
Hi, my name is Jan Stępień
Topaz is a Ruby implementation written in Python
Topaz is a Ruby implementation which is faster
Ruby Topaz is a bird from South America
cc-by-sa-3.0 geimfyglið
Topaz is in Ruby Python
cc-by-sa-3.0 geimfyglið
cc-by-nc-sa-2.0 marie
Why? would you implement Ruby in Python?
Python CPython PyPy
Ruby MRI JRuby Rubinius
PyPy is a Python implementation
PyPy is amazingly fast See http://speed.pypy.org
PyPy is written in RPython
RPython is a subset of Python
RPython can be statically compiled to C
RPython is optimised for implementing VMs
PyPy is an impl. of Python PyPy is written in
RPython RPython is compiled to C
Topaz is an impl. of Ruby Topaz is written in
RPython RPython is compiled to C
git clone http://github.com/topazproject/topaz
$ cd topaz && cloc . Language files code Python
132 22934 Ruby 35 5058
$ time ./bin/topaz_untranslated.py 3.times { puts :hello } ˆD hello
hello hello real 0m3.539s
$ cd topaz $ python \ .../pypy/rpython/bin/rpython \ -Ojit targettopaz.py
RPython → C
None
$ time ./bin/topaz 3.times { puts :hello } ˆD hello
hello hello real 0m0.050s
freqs = [0] * 256 while buf = $stdin.read(8192) buf.bytes.each
do |b| freqs[b] += 1 end end p freqs
MRI 2.0 36,1 s 5,0 MB/s JRuby 1.7.2 24,8 s
7,3 MB/s Topaz 3,3 s 55,3 MB/s 180MB of data served from caches
50 100 150 Input size [MB] 10 30 20 0
Time [s] M RI JRuby Topaz
Topaz redefines what fast means in the Ruby world
Why is it so fast? PyPy!
Meta-tracing just-in-time compilation
None
Get the source and try for yourself
Is Topaz a Ruby-Python interoperability bridge? No, unfortunately it’s not.
Topaz is still very young
Contributing is easy
See also 096 RR Topaz with Alex Gaynor Introducing Topaz
– Tim Felgentreff topazruby.com
dankeschön dziękuję ślicznie