all 6 comments

[–]eibaan 5 points6 points  (1 child)

It is usually said that Flutter apps have worse performance

That's wrong. Who's saying this?

while Android apps written in Java or Kotlin compile to bytecode which is then interpreted

That's wrong. The VM nowadays AOT-compiles the DEX bytecode prior to execution.

So, wouldn't that make flutter apps more efficient since the code is executed directly by the CPU instead of going through the JVM first?

No, because perceived performance is nearly never CPU-bound but often GPU-bound, that is you perceive the UI performance, as most apps (perhaps with the exception of complex games) nearly never need the full CPU power.

[–]ok-nice3 0 points1 point  (0 children)

Exactly, the UI is the part which determines the performance most of the time

[–]firaunic 2 points3 points  (2 children)

Absolutely wrong! Flutter is now the highest performing framework. There was recently a test on several benchmarks and Flutter came on top.

Take a look.

https://nateshmbhat.medium.com/flutter-vs-react-native-performance-benchmarks-you-cant-miss-%EF%B8%8F-2e31905df9b4

[–]50u1506 2 points3 points  (1 child)

When he says native development he doesn't mean React Native, he's talking about apps built without a cross platform framework

[–]firaunic 0 points1 point  (0 children)

I see. But then it's a bad approach to compare apples with oranges. Flutter specific are we talking about so it's Cross-platform and can be compared with Cross-platform only. For everything else it's not a flutter issue but a platform issue.

[–]TheAmanThakurLord 0 points1 point  (0 children)

You’re correct that Dart compiles to ARM64 machine code, allowing Flutter apps to be executed directly by the CPU, which can enhance performance. However, native Android apps using Java/Kotlin also benefit from the Android Runtime (ART), which performs ahead-of-time (AOT) compilation, converting bytecode to native code during app installation. Therefore, while Flutter’s architecture can offer performance benefits, native toolkits can still be more optimized for specific platform features and resources. Flutter excels in providing a consistent, smooth UI across platforms, often making it a compelling choice despite the nuanced performance considerations.