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
230
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Scala Native
社内勉強会用資料です
yubessy
January 29, 2018
More Decks by yubessy
See All by yubessy
DDIA (Designing Data-Intensive Applications) はいいぞ
yubessy
0
1.6k
Introduction to CircleCI
yubessy
1
130
Docker Hands-on
yubessy
0
120
Resource Polymorphism
yubessy
0
310
不動点コンビネータ?
yubessy
0
320
とりあえず機械学習したかった
yubessy
0
350
Type Erasure と Reflection のはなし
yubessy
1
490
量子暗号
yubessy
0
240
5分ちょいでわかった気になるラムダアーキテクチャ
yubessy
0
2.3k
Other Decks in Programming
See All in Programming
Semantic Version 単位で戦略を柔軟に変えて、パッケージアップデートを自動化する
daitasu
1
260
スマートグラスで並列バイブコーディング
hyshu
0
170
技術記事、 専門家としてのプログラマ、 言語化
mizchi
13
6.2k
Creating Composable Callables in Contemporary C++
rollbear
0
150
IBM Bobを活用したレガシーアプリの最新化
oniak3ibm
PRO
1
200
A2UI という光を覗いてみる
satohjohn
1
140
jQueryをバージョンアップする前に使いたいjQuery Migrate
matsuo_atsushi
0
560
Language Server 使ってる? 〜VSCode と Zed の場合〜 / Are you using a Language Server? ~For VS Code and Zed~
handlename
0
800
OSもどきOS
arkw
0
570
The ROI of Quarkus for Spring Boot Applications
hollycummins
0
120
Mujeres en SEO Summit 2026 - Greatest Disaster Hits en Web Performance
guaca
0
190
正しくソフトウェアを作る、前提を疑うための認知の視点 / doubt-premise
minodriven
21
6.8k
Featured
See All Featured
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.2k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.4k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
Un-Boring Meetings
codingconduct
0
320
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
320
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
1.1k
Ruling the World: When Life Gets Gamed
codingconduct
0
260
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
150
The World Runs on Bad Software
bkeepers
PRO
72
12k
Code Reviewing Like a Champion
maltzj
528
40k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.9k
How GitHub (no longer) Works
holman
316
150k
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