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
A PoC-ish Trick: LLVM IR Generation with Ruby
Search
remore
November 11, 2016
Technology
1.5k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
A PoC-ish Trick: LLVM IR Generation with Ruby
A Lightning Talk at RubyConf 2016
remore
November 11, 2016
More Decks by remore
See All by remore
Turning CDN edge into a Rack web server with ruby.wasm
remore
0
870
Prototyping Kubernetes CRI With Ruby and gRPC
remore
3
1.3k
How I made a pure-Ruby word2vec program more than 3x faster
remore
3
3.3k
Code, Arguments and Startups
remore
0
1.8k
詳解🔍Burn🔥
remore
4
5.5k
DockerCon 2015 Quick Recap
remore
0
490
dockerfileview: A Dockerfile viewer to trace ancestry of the base image
remore
2
480
Burn: 8-Bit Game Development With Ruby
remore
3
1.1k
Other Decks in Technology
See All in Technology
Browser Spec: Testing Hotwire with Ruby
takahashim
1
130
SAENM ~Jupyterで残すPoCの試行錯誤、未来の自分と仲間を助ける記録!~
terapyon
0
120
フロントエンドカンファレンス関西2026 - 速すぎるUIに、待ち時間を
teamlab
PRO
0
190
Active Record Connection Adaptersにおける長年の課題に再び取り組む
yahonda
0
200
宣言型部分更新は何を解決しどこへ向かうのか
shuta13
1
480
自作バイナリを動かす「入口」8選
puhitaku
2
1.3k
S3 Filesで挑む! 八戸せんべい汁の食べ頃問題
usanchuu
0
120
エンタメ企業のM&Aを支えるデータ基盤 ― 統合から店舗のリアルタイム分析まで / Data Engineering Summit 2026
genda
0
200
コンテナ運用におけるネットワーク・コンテナコストの削減方法/How to Reduce Network and Container Costs in Container Operations
masakiokuda
2
310
脆弱性診断って、何をしているの? 〜弱点を見つけて、会社の改善につなげるまで〜
keeg
0
930
触りたくないデータに、どう触るか AI時代のRBACアクセスガバナンス
ivry_presentationmaterials
0
280
Getting Started with Google Antigravity
glaforge
0
320
Featured
See All Featured
Game over? The fight for quality and originality in the time of robots
wayneb77
1
310
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
710
Heart Work Chapter 1 - Part 1
lfama
PRO
10
37k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
490
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
360
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
YesSQL, Process and Tooling at Scale
rocio
174
15k
A Tale of Four Properties
chriscoyier
163
24k
Site-Speed That Sticks
csswizardry
13
1.6k
brightonSEO & MeasureFest 2025 - Winning Strategies for Black Friday CRO & PPC - Christian Goodrich
cargoodrich
3
870
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.2k
Transcript
A PoC-ish Trick: LLVM IR Generation with Ruby A Lightning
Talk at RubyConf 2016 Kei Sawada (@remore)
None
a modern, fast, and open source language for data science
and technical computing
Julia is 4 years old young Good performance, as fast
as C Dynamic typing Julia has Capability to call C functions directly without wrappers or special APIs a compiler that used LLVM to translate Julia programs into ef cient executable code
In short,
Write some Julia code then you will get LLVM IR
without hassle
debussy:~ guest$ julia _ _ _ _(_)_ | A fresh
approach to technical computin (_) | (_) (_) | Documentation: http://docs.julialang.o _ _ _| |_ __ _ | Type "?help" for help. | | | | | | |/ _` | | | | |_| | | | (_| | | Version 0.4.6 (2016-06-19 17:16 UTC) _/ |\__'_|_|_|\__'_| | |__/ | x86_64-apple-darwin15.5.0 julia>
debussy:~ guest$ julia _ _ _ _(_)_ | A fresh
approach to technical computin (_) | (_) (_) | Documentation: http://docs.julialang.o _ _ _| |_ __ _ | Type "?help" for help. | | | | | | |/ _` | | | | |_| | | | (_| | | Version 0.4.6 (2016-06-19 17:16 UTC) _/ |\__'_|_|_|\__'_| | |__/ | x86_64-apple-darwin15.5.0 julia> function hello() "rubyconf" end hello (generic function with 1 method) julia>
debussy:~ guest$ julia _ _ _ _(_)_ | A fresh
approach to technical computin (_) | (_) (_) | Documentation: http://docs.julialang.o _ _ _| |_ __ _ | Type "?help" for help. | | | | | | |/ _` | | | | |_| | | | (_| | | Version 0.4.6 (2016-06-19 17:16 UTC) _/ |\__'_|_|_|\__'_| | |__/ | x86_64-apple-darwin15.5.0 julia> function hello() "rubyconf" end hello (generic function with 1 method) julia> hello() "rubyconf" julia>
julia> code_llvm(hello, ()) define %jl_value_t* @julia_hello_21549() { top: ret %jl_value_t*
inttoptr (i64 4447575696 to %jl_value_t*) } julia>
julia> code_llvm(hello, ()) define %jl_value_t* @julia_hello_21549() { top: ret %jl_value_t*
inttoptr (i64 4447575696 to %jl_value_t*) } julia> code_native(hello, ()) .section __TEXT,__text,regular,pure_instructions Filename: none Source line: 2 pushq %rbp movq %rsp, %rbp movabsq $4447575696, %rax ## imm = 0x109189E90 Source line: 2 popq %rbp ret julia>
OK Julia is a thing But we are in
None
What if
You can write some Ruby code which can be translated
into Julia where you can get LLVM IR easily?
Ruby -> Julia -> LLVM IR
None
Julializer Allow you to convert your arbitrary Ruby code into
Julia code
Time to DEMO!
For more examples and attempts, check out: github.com/remore/julializer github.com/remore/virtual_module Thanks!