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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
yubessy
January 29, 2018
Programming
0
230
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
120
Docker Hands-on
yubessy
0
110
Resource Polymorphism
yubessy
0
300
不動点コンビネータ?
yubessy
0
310
とりあえず機械学習したかった
yubessy
0
340
Type Erasure と Reflection のはなし
yubessy
1
480
量子暗号
yubessy
0
240
5分ちょいでわかった気になるラムダアーキテクチャ
yubessy
0
2.3k
Other Decks in Programming
See All in Programming
Rで始めるML・LLM活用入門
wakamatsu_takumu
0
170
How to stabilize UI tests using XCTest
akkeylab
0
110
どんと来い、データベース信頼性エンジニアリング / Introduction to DBRE
nnaka2992
1
270
技術検証結果の整理と解析をAIに任せよう!
keisukeikeda
0
110
今更考える「単一責任原則」 / Thinking about the Single Responsibility Principle
tooppoo
3
1.6k
maplibre-gl-layers - 地図に移動体たくさん表示したい
kekyo
PRO
0
240
手戻りゼロ? Spec Driven Developmentとは@KAG AI week
tmhirai
1
190
ロボットのための工場に灯りは要らない
watany
10
2.5k
20260228_JAWS_Beginner_Kansai
takuyay0ne
5
470
PostgreSQL を使った快適な go test 環境を求めて
otakakot
0
530
15年目のiOSアプリを1から作り直す技術
teakun
1
620
Unity6.3 AudioUpdate
cova8bitdots
0
120
Featured
See All Featured
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
82
The SEO Collaboration Effect
kristinabergwall1
0
390
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.2k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
930
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
69
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
KATA
mclloyd
PRO
35
15k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.3k
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