Starting from Scratch with Scala Native
summary
Introduction to using Scala Native for systems programming with concrete results: implements a max-finder and an in-memory sorter over the Google Ngrams dataset, using qsort + malloc + scanf + fgets and explicit structs, pointers and stack allocation. Benchmarks show native startup and throughput advantages — e.g. 4.7s vs 5.4s on 100MB, native 15s vs JVM 29s at 500MB, native 30s vs JVM 90s at ~1.1GB, native 43s vs JVM 186s on 1.7GB — and the implementations work and scale with far less allocation pressure.
AI-written summary · about
chapters (22)
- 0:00This talk is about
- 0:58Talk Outline
- 1:58About Me
- 2:48Scala Native is
- 5:11The Basics
- 8:24Systems Programming
- 12:01What's a CString?
- 16:53Stack Allocation
- 18:28Heap Allocation
- 24:09Google NGrams
- 25:26Maximum Count (JVM)
- 25:58Maximum Count (Native)
- 28:02Find Maximum Count
- 30:36Performance
- 32:05Sorting NGrams
- 32:27Sorting: JVM
- 33:21What's a CStruct?
- 34:02Modeling an NGram
- 34:58Sorting: Native
- 39:34Aggregation: Native
- 40:02Reflections
- 43:12Hardware is Changing
related talks
49mStarting from Scratch with Scala Native
35mA Deep Dive into Scala Native Internals
41mLessons to Scala Native from Kotlin Native
27mScala and C – tight as brothers
30mBinding Native Plugins with Flutter and Dart
37mFun with Native Code on Android
24mA Beginner's Guide to High-Performance Integration
50mC++ at High Subsonic Speed
