Apple Array Allocation
summary
Presents a JITed expression language that uses statically determined memory allocation to manage flat immutable arrays with no garbage collector and no ownership system, claiming one allocation per array (rank + dims + elements) and reachable free insertion via extended liveness analysis. Pipeline produces IR, runs liveness, inserts frees; demos include histogram and Bessel plots from Python and R, a Python extension ~200 lines of C and ~100–120 lines of R, and compilation to object files — the approach works and shows loop fusion.
AI-written summary · about
chapters (14)
- 0:00Apple array allocation
- 1:04Compiler design inspirations
- 3:30Flat arrays memory rules
- 5:16Compiler pipeline liveness
- 8:31Memory safety loop handling
- 9:36Polyglot Python R workflows
- 12:09Canonical implementation
- 13:13Debug inspection capabilities
- 15:00Future allocation work
- 17:42Array reuse with shape types
- 18:27Rust vs garbage collection
- 20:17Scalability limits
- 21:20Host integration extensions
- 22:01Compiler as library vs APL
related talks
51mArrays 2.0 - Opportunities and Challenges
25mAn Array-Oriented Language via the Design Recipe
19mCompiling Recurrences over Dense and Sparse Arrays
55mNew Bytecodes, New Objects
43muarray - Efficient and Generic Array Computation
15mCompilation of Sparse Array Programming Models
53mFROM SCALA TO ASSEMBLY THE COST OF ABSTACTION REVISITED
30mAn Incremental Approach to JIT Construction
