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
610
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
830
Compiling a lisp into a lisp using a lisp
jan
0
210
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
Apple Intelligence を用いた個人情報誤送信防止、及びユーザーリクエスト体験の改善について
yukiny
0
350
Verilogで学ぶCPU自作入門
uyuki234
8
4.1k
Workers Cache を知る
syumai
0
360
iOS 27でニュースアプリはどう変わる!? 〜日経電子版の新機能対応と、開発事例から〜
lynnswap
7
13k
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
2
1.6k
Atomic Design, Enforced: Scaling Mobile Design Systems (next.app devCon / droidCon Berlin 2026)
steliosf
PRO
0
170
SalesForceを内製化!? ~ HR事業を支える顧客管理基盤のインフラを大公開 ~
oku053
0
180
Domain-Driven Transformation
hschwentner
2
2.3k
ChromeでローカルLLM
ryu1013
0
140
dotNET_vulnclicker_intro.pdf
deka_morita
0
140
[Dev Group Paris Octobre 26] Agentforce, SIforce, Claudeforce, Slackbot… on s'y retrouve ?
nabondance
0
110
contenteditable と日本語入力に向き合う
colorful12
0
200
Featured
See All Featured
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.6k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
730
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.5k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
How STYLIGHT went responsive
nonsquared
100
6.3k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
570
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
20k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
74
43k
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