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
210
Scala Native
社内勉強会用資料です
yubessy
January 29, 2018
Tweet
Share
More Decks by yubessy
See All by yubessy
DDIA (Designing Data-Intensive Applications) はいいぞ
yubessy
0
1.2k
Introduction to CircleCI
yubessy
1
99
Docker Hands-on
yubessy
0
93
Resource Polymorphism
yubessy
0
270
不動点コンビネータ?
yubessy
0
250
とりあえず機械学習したかった
yubessy
0
320
Type Erasure と Reflection のはなし
yubessy
1
420
量子暗号
yubessy
0
200
5分ちょいでわかった気になるラムダアーキテクチャ
yubessy
0
2.1k
Other Decks in Programming
See All in Programming
A Journey of Contribution and Collaboration in Open Source
ivargrimstad
0
890
Make Impossible States Impossibleを 意識してReactのPropsを設計しよう
ikumatadokoro
0
170
アジャイルを支えるテストアーキテクチャ設計/Test Architecting for Agile
goyoki
9
3.3k
Creating a Free Video Ad Network on the Edge
mizoguchicoji
0
120
Amazon Qを使ってIaCを触ろう!
maruto
0
400
Quine, Polyglot, 良いコード
qnighy
4
640
Contemporary Test Cases
maaretp
0
130
Pinia Colada が実現するスマートな非同期処理
naokihaba
4
220
C++でシェーダを書く
fadis
6
4.1k
ふかぼれ!CSSセレクターモジュール / Fukabore! CSS Selectors Module
petamoriken
0
150
LLM生成文章の精度評価自動化とプロンプトチューニングの効率化について
layerx
PRO
2
190
CSC509 Lecture 11
javiergs
PRO
0
180
Featured
See All Featured
How To Stay Up To Date on Web Technology
chriscoyier
788
250k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
720
Typedesign – Prime Four
hannesfritz
40
2.4k
Thoughts on Productivity
jonyablonski
67
4.3k
Producing Creativity
orderedlist
PRO
341
39k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
1.9k
Optimizing for Happiness
mojombo
376
70k
Writing Fast Ruby
sferik
627
61k
Teambox: Starting and Learning
jrom
133
8.8k
KATA
mclloyd
29
14k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.8k
A better future with KSS
kneath
238
17k
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