https://github.com/amake/flutter_prime_test
A performance comparison of Dart, "platform", and "native" layers in Flutter
https://github.com/amake/flutter_prime_test
c cpp dart flutter kotlin performance swift
Last synced: about 14 hours ago
JSON representation
A performance comparison of Dart, "platform", and "native" layers in Flutter
- Host: GitHub
- URL: https://github.com/amake/flutter_prime_test
- Owner: amake
- License: other
- Created: 2019-08-05T13:15:35.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-08-21T07:13:58.000Z (over 6 years ago)
- Last Synced: 2025-10-26T02:04:33.846Z (6 months ago)
- Topics: c, cpp, dart, flutter, kotlin, performance, swift
- Language: Dart
- Size: 73.2 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# flutter_prime_test
A test comparing Flutter performance across three layers:
1. Dart (common)
2. "Platform": Swift (iOS) and Kotlin (Android)
3. "Native": C (iOS) and C++ (Android)
(I assume that Objective-C is similar to C, and Java is similar to Kotlin in
performance, so they are not used.)
This app implements a naive search for prime numbers, reporting in the UI one
prime number for every 250 found, along with the elapsed time since the previous
one.
## Observations
- In a debug build, Swift is astoundingly slow
- In a debug build, C++ starts fast but slows down surprisingly quickly
- In a release build, everything is pretty much equally fast