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
Topaz is Ruby in Python
Search
Jan Stępień
June 12, 2013
Programming
590
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
260
That Looks Oddly Familiar
jan
0
480
Native Clojure
jan
0
280
Native Clojure with GraalVM
jan
0
810
Compiling a lisp into a lisp using a lisp
jan
0
200
Mutation testing in continuous delivery pipelines
jan
0
220
Self-contained systems: an introduction
jan
0
260
Let's just test that real quick
jan
1
470
Combating spam, or how I befriended the Killer Rabbit of Caerbannog
jan
0
330
Other Decks in Programming
See All in Programming
脅威をエンジニアリングの糧にして――現場編 / Turning Threats into Engineering Fuel — Field Edition
nrslib
0
310
Make SRE Operations Easier with Azure SRE Agent
kkamegawa
0
9.1k
The ROI of Quarkus for Spring Boot Applications
hollycummins
0
150
Go1.27で導入されるジェネリクスメソッドでできること
mackee
0
210
フロントエンドとバックエンドで「1文字」を揃えよう
youkidearitai
PRO
0
770
過去最大のMCPアップデート! 2026-07-28 RC版の謎に迫る
licux
6
420
コンテキストの使い捨てをやめる — ビジネスルール駆動開発と miko —
ioki
0
250
jQueryをバージョンアップする前に使いたいjQuery Migrate
matsuo_atsushi
0
610
LaravelLive Japan の裏方のすべて — 第188回 PHP勉強会@東京 (2026-06-24)
suguruooki
2
130
ローカルLLMを使ってB2Bサービスを作っていての学び
yaotti
0
220
IBM Bobを活用したレガシーアプリの最新化
oniak3ibm
PRO
1
220
エンジニア向け会社紹介/Findy Company Profile
findyinc
6
360k
Featured
See All Featured
Joys of Absence: A Defence of Solitary Play
codingconduct
1
400
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
250
A Soul's Torment
seathinner
6
3k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
201
75k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
550
The Spectacular Lies of Maps
axbom
PRO
1
830
A Tale of Four Properties
chriscoyier
163
24k
Agile that works and the tools we love
rasmusluckow
331
22k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
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