This benchmark suite provides an apples-to-apples performance comparison between:
- Flutter (Impeller/Skia rendering engine)
- Native iOS (SwiftUI)
- TECHNICAL.md - Comprehensive technical details about benchmark methodology, implementation, measurement approaches, and results analysis
- Academic Paper - Full scientific documentation in LaTeX
| Metric | Description | Implementation |
|---|---|---|
| CPU Efficiency | Single-thread performance | Sieve of Eratosthenes (1M primes) on main thread |
| FPS Stability | Frame rendering consistency | 1000-item list with 30s auto-scroll |
| Memory (RAM) | Memory allocator stress | Complex UI elements with gradients/shadows |
| Battery Impact | Energy consumption | Battery level delta during GPU test |
| App Startup Time | Time to Interactive (TTI) | main() → first frame rendered |
Below are screenshots and video demos of the apps and their benchmark tests:
| iOS App | |
|---|---|
![]() |
demo_ios.mp4 |
| Flutter App | |
![]() |
demo_flutter.mp4 |
Projects/
├── flutter_benchmark/ # Flutter App
│ ├── lib/
│ │ ├── main.dart # Entry point + startup time measurement
│ │ ├── app.dart # App root & routing
│ │ ├── core/ # Config, theme, utilities
│ │ ├── features/
│ │ │ ├── cpu_test/ # CPU benchmark screen & algorithm
│ │ │ ├── gpu_test/ # GPU/FPS/Memory/Battery test screen
│ │ │ └── home/ # Home screen
│ │ ├── services/ # Battery & memory MethodChannels
│ │ └── widgets/ # Shared UI components
│ ├── ios/Runner/AppDelegate.swift # Battery MethodChannel (native side)
│ └── pubspec.yaml
│
├── ios_benchmark/ # Native iOS App (SwiftUI)
│ └── iOSBenchmark/
│ ├── iOSBenchmarkApp.swift # Entry point + startup time measurement
│ ├── ContentView.swift # Navigation
│ ├── CPUTestView.swift # CPU benchmark
│ └── GPUTestView.swift # GPU/FPS/Memory/Battery test
│
├── documentation/ # Academic paper (LaTeX)
│ ├── paper.tex
│ └── refs.bib
│
├── screenshots/ # App screenshots & demo media
├── presentation/ # Presentation slides
├── README.md
└── TECHNICAL.md # Benchmark methodology & results analysis
Purpose: Measure raw single-thread computational performance.
| Parameter | Value |
|---|---|
| Algorithm | Sieve of Eratosthenes |
| Range | 2 to 1,000,000 |
| Expected Result | 78,498 primes |
| Thread | Main UI Thread (intentionally blocking) |
| Measurement | Execution time in microseconds |
Scientific Rationale: Running on the main thread tests how each framework handles CPU-bound tasks and measures UI freezing behavior.
Purpose: Stress the GPU rasterizer and memory allocator.
| Parameter | Value |
|---|---|
| List Items | 1,000 complex items |
| Item Content | Gradient backgrounds, shadows, tags, buttons |
| Auto-Scroll Duration | 30 seconds (constant velocity) |
| Scroll Curve | Linear (identical velocity on both platforms) |
Measurements:
- FPS: Frame build times logged via
SchedulerBinding(Flutter) /CADisplayLink(iOS) - Jank Detection: Frames > 16.67ms (missing 60 FPS target)
- Memory: Monitored via Xcode Instruments / Flutter DevTools
Purpose: Measure energy consumption during GPU stress.
| Parameter | Value |
|---|---|
| Method | Battery level % before/after 30s scroll |
| Implementation | UIDevice.batteryLevel (iOS) / MethodChannel (Flutter) |
| Output | Delta percentage (e.g., "Battery Drain: 1%") |
Note: Battery monitoring requires a physical device. Simulators return -1.
Purpose: Measure Time to Interactive.
| Event | Flutter | iOS |
|---|---|---|
| Start | main() function called |
@main app launch |
| End | addPostFrameCallback fires |
.onAppear modifier |
| Measurement | Microseconds (μs) | Microseconds (μs) |
cd flutter_benchmark
# Get dependencies
flutter pub get
# Run in release mode for accurate benchmarks
flutter run --release
# Or profile mode for Flutter DevTools
flutter run --profile- Open
ios_benchmark/iOSBenchmark.xcodeprojin Xcode - Select a physical device (for battery metrics)
- Build & Run (⌘R)
- For performance profiling, use Product → Profile (⌘I)
Both apps print detailed logs:
═══════════════════════════════════════════════
FLUTTER BENCHMARK - CPU TEST RESULTS
═══════════════════════════════════════════════
Algorithm: Sieve of Eratosthenes
Limit: 1000000
Primes found: 78498
Execution time: 45230 μs
Execution time: 45.23 ms
═══════════════════════════════════════════════
| Metric | Good | Acceptable | Poor |
|---|---|---|---|
| CPU Time | < 50ms | 50-100ms | > 100ms |
| Jank Rate | < 1% | 1-5% | > 5% |
| Est. FPS | ≥ 58 | 50-58 | < 50 |
| Avg Frame Time | < 16.67ms | 16.67-33ms | > 33ms |
To ensure valid comparison:
- Same Device: Run both apps on the same physical device
- Same Conditions: Close background apps, same battery state
- Release Builds: Use release/production builds for both
- Multiple Runs: Run each test 5+ times and average results
- Cool-Down Period: Wait 1-2 minutes between tests to prevent thermal throttling
- Flutter SDK 3.10+
- Dart 3.0+
- iOS 12.0+ / Android API 21+
- Xcode 15.0+
- iOS 17.0+
- Swift 5.9+
MIT License - WISA Course Project

