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
Scala Native
Search
yubessy
January 29, 2018
Programming
0
220
Scala Native
社内勉強会用資料です
yubessy
January 29, 2018
Tweet
Share
More Decks by yubessy
See All by yubessy
DDIA (Designing Data-Intensive Applications) はいいぞ
yubessy
0
1.5k
Introduction to CircleCI
yubessy
1
110
Docker Hands-on
yubessy
0
100
Resource Polymorphism
yubessy
0
290
不動点コンビネータ?
yubessy
0
290
とりあえず機械学習したかった
yubessy
0
330
Type Erasure と Reflection のはなし
yubessy
1
450
量子暗号
yubessy
0
220
5分ちょいでわかった気になるラムダアーキテクチャ
yubessy
0
2.2k
Other Decks in Programming
See All in Programming
実用的なGOCACHEPROG実装をするために / golang.tokyo #40
mazrean
1
280
Design Foundational Data Engineering Observability
sucitw
3
200
Laravel Boost 超入門
fire_arlo
3
220
Processing Gem ベースの、2D レトロゲームエンジンの開発
tokujiros
2
130
AIと私たちの学習の変化を考える - Claude Codeの学習モードを例に
azukiazusa1
10
4.1k
Namespace and Its Future
tagomoris
6
700
ProxyによるWindow間RPC機構の構築
syumai
3
1.2k
AIでLINEスタンプを作ってみた
eycjur
1
230
為你自己學 Python - 冷知識篇
eddie
1
350
もうちょっといいRubyプロファイラを作りたい (2025)
osyoyu
1
440
go test -json そして testing.T.Attr / Kyoto.go #63
utgwkk
3
300
Navigation 2 を 3 に移行する(予定)ためにやったこと
yokomii
0
260
Featured
See All Featured
Building Adaptive Systems
keathley
43
2.7k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
112
20k
Fireside Chat
paigeccino
39
3.6k
How to Think Like a Performance Engineer
csswizardry
26
1.9k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
36
2.5k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.4k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
9
810
The Pragmatic Product Professional
lauravandoore
36
6.9k
Automating Front-end Workflow
addyosmani
1370
200k
Music & Morning Musume
bryan
46
6.8k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
126
53k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
Transcript
Scala Native @yubessy 0x64 Reboot #10 " "
: : ( ) x -> o +
Scala Native Scala Scala JVM -> Java Scala Native ->
Java
LLVM (?) Scala Native Scala SBT
$ sbt new scala-native/scala-native.g8 object Main { def main(args: Array[String]):
Unit = println("Hello, world!") } $ sbt run Hello, World!
LLVM https://github.com/okapies/scala-native-example bonacci
(rec) def fib(n: Long): Long = n match { case
0 => 0 case 1 => 1 case _ => fib(n - 2) + fib(n - 1) }
(tail rec) def fibImpl(n: Long, a: Long, b: Long): Long
= n match { case 0 => a case _ => fibImpl(n - 1, b, a + b) } def fib(n: Long): Long = { fibImpl(n, 0, 1) }
(mut rec) def fib(n: Long): Long = n match {
case 0 => 0 case _ => fibS(n - 1) } def fibS(n: Long): Long = n match { case 0 => 1 case _ => fib(n - 1) + fibS(n - 1) }
(μs) rec tail rec mut rec JAR 74801223 262 67248872
Native -O0 168336051 4 164421481 Native -O2 77311107 4 34026913 Native -O0 ( ) rec, mute rec JAR . tail rec Native -O2 ( ) mute rec JAR
Scala Native LLVM