Performance Features
Pleno includes a suite of compiler and VM optimizations designed for high-performance execution.
19.1 Basic Optimizations (Implemented)
- Dead Code Elimination (DCE): Removes unreachable code and unused bindings at compile time.
- Function Inlining: Automatically inlines small, hot functions to reduce call overhead.
- Constant Folding: Pre-calculates constant expressions during compilation.
19.2 Advanced Features (Planned)
(Deferred for v2.0)
Note: Advanced performance features like JIT and advanced GC hints are planned for future releases.
19.1 JIT Compilation
- Hot path optimization
- Automatic inlining of small functions
- Dead code elimination
19.2 Memory Management
- Generational garbage collection
- Reference counting for immediate cleanup
- Optional manual memory hints
- Object pooling support
19.3 Optimization Hints
pleno
// Inline hint
@inline
fn fastOperation(x: Int): Int {
return x * 2;
}
// No optimization (for debugging)
@no_optimize
fn debugFunction() {
// Keep unoptimized for debugging
}
// Hot path hint
@hot
fn criticalPath() {
// Prioritize optimization
}Run