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.3k
Introduction to CircleCI
yubessy
1
100
Docker Hands-on
yubessy
0
95
Resource Polymorphism
yubessy
0
270
不動点コンビネータ?
yubessy
0
260
とりあえず機械学習したかった
yubessy
0
320
Type Erasure と Reflection のはなし
yubessy
1
430
量子暗号
yubessy
0
210
5分ちょいでわかった気になるラムダアーキテクチャ
yubessy
0
2.2k
Other Decks in Programming
See All in Programming
How mixi2 Uses TiDB for SNS Scalability and Performance
kanmo
35
14k
2024年のWebフロントエンドのふりかえりと2025年
sakito
1
240
AIの力でお手軽Chrome拡張機能作り
taiseiue
0
170
[Fin-JAWS 第38回 ~re:Invent 2024 金融re:Cap~]FaultInjectionServiceアップデート@pre:Invent2024
shintaro_fukatsu
0
410
さいきょうのレイヤードアーキテクチャについて考えてみた
yahiru
3
740
動作確認やテストで漏れがちな観点3選
starfish719
6
1k
Grafana Loki によるサーバログのコスト削減
mot_techtalk
1
120
GitHub Actions × RAGでコードレビューの検証の結果
sho_000
0
250
Djangoアプリケーション 運用のリアル 〜問題発生から可視化、最適化への道〜 #pyconshizu
kashewnuts
1
240
データの整合性を保つ非同期処理アーキテクチャパターン / Async Architecture Patterns
mokuo
45
16k
GAEログのコスト削減
mot_techtalk
0
120
ファインディLT_ポケモン対戦の定量的分析
fufufukakaka
0
490
Featured
See All Featured
Java REST API Framework Comparison - PWX 2021
mraible
28
8.4k
Designing for Performance
lara
604
68k
Building Adaptive Systems
keathley
40
2.4k
How to Ace a Technical Interview
jacobian
276
23k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2.1k
Product Roadmaps are Hard
iamctodd
PRO
50
11k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.5k
Reflections from 52 weeks, 52 projects
jeffersonlam
348
20k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
40
2k
Bash Introduction
62gerente
610
210k
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