Starting from Scratch with Scala Native
summary
Scala Native compiles Scala to LLVM and produces native binaries, uses C ABI types and direct libc calls like printf, scanf, qsort and malloc. Examples process the Google ngrams file: a naive line scan then a sort and an aggregation using stack allocation to avoid GC and qsort + malloc/realloc for big arrays. Empirical result: for a 1.7 GB file the JVM run is ~186s while native is ~43s, showing 4–6x speedups.
AI-written summary · about
chapters (10)
- 0:00Introduction to Scala Native
- 2:46Understanding Scala Native
- 6:43Working with C-style strings
- 11:27Pointer arithmetic basics
- 16:04Memory allocation techniques
- 20:20Essential C standard functions
- 23:25N-gram data algorithm study
- 28:28Data structures and sorting
- 37:01Advanced data aggregation
- 41:30Future outlook and conclusions
related talks
45mStarting from Scratch with Scala Native
35mA Deep Dive into Scala Native Internals
27mScala and C – tight as brothers
37mFun with Native Code on Android
30mBinding Native Plugins with Flutter and Dart
04mLightning Talk - Native Code from Elixir
50mC++ at High Subsonic Speed
43mLeveraging Scala to Build Hardware at Scale
