Langsung ke konten utama

Flutter vs Native vs React-Native: Examining performance

Flutter vs Native vs React-Native: Examining performance

inVerita
Mar 10 · 4 min read
Today some of the most popular solutions to build mobile apps are native or cross-platform approaches using React Native or Flutter. While native development is positioned as AAA technical solution, it has some disadvantages that create market space for cross-platform apps to come in. In general, native development requires more effort from the development team to accomplish the project but it gives full control over tricky technical stuff under the hood. On the other hand, if you choose cross-platform, it can significantly speed up the development process due to a common code base, make project support easier and reduce expenses for development.
One more advantage of native over cross-platform development is performance. In the technical world, you can encounter “cross-platform apps are slow” stereotypes. We decided to test if it’s true and to what extend cross-platform apps are slower than native.

There are different types of performance, some of them are:

  1. Interacting with phone API (accessing photos, file system, getting GPS location and so on).
  2. Rendering speed (animation smoothness, frames per second while UI is changed or some UI effects that take place in time).
  3. Business logic (the speed of mathematical calculations and memory manipulations. This type of performance is most important for the apps with complex business logic).
In this article, we share the results of performance tests showing mathematical calculations of number Pi implemented in native and cross-platform approaches.

CPU-intensive test (Gauss–Legendre algorithm) for iOS

Memory-intensive test (Gauss–Legendre algorithm) for iOS
iOS
  • Objective-C is the best programming language for iOS development. Swift is 1.7 times slower compared to Objective C.
  • Surprise: Flutter is a bit faster than Swift (on 15%).
  • React Native is 20 times slower than Objective C.

CPU-intensive test (Borwein algorithm) for iOS

CPU-intensive test (Borwein algorithm) for iOS
iOS
  • Objective C is the best option for iOS app development. Swift is 1.9 times slower compared to Objective-C.
  • Flutter is 5 times slower than Swift.
  • React Native version is more than 15 times slower than the Swift version.

CPU-intensive test (Gauss–Legendre algorithm) for Android

Memory-intensive test (Gauss–Legendre algorithm) for Android
Android
  • Java and Kotlin have similar performance indications and are the best options for Android development.
  • Flutter is approximately 20% slower than native.
  • React Native is around 15 times slower than native.

CPU-intensive test (Borwein algorithm) for Android

CPU-intensive test (Borwein algorithm) for Android
Android
  • Java and Kotlin have similar performance indications and are the best options for Android development.
  • Native is 2 times faster then Flutter.
  • React native is around 6 times slower than native.

Technical details:

  1. All tests have been done on real physical devices (iPhone 6s IOS 13.2.3 and Xiaomi Redmi Note 5 running under Android 9.0);
  2. We measured performance on release builds. In some cases, debug builds can be significantly slower than the release builds.
  3. All tests were run several times and the average result was calculated.
  4. Gauss–Legendre & Borwein algorithms of calculating Pi numbers were used. The Pi number has been calculated 100 times with 10 million digits precision.
  5. Gauss–Legendre is a more memory-intensive algorithm in comparison with Borwein, but Borwein is more CPU-intensive.
  6. Source code

Key takeaways

  1. In summary, not all cross-platform apps are slow. What’s more than that, Flutter apps have higher performance than Swift apps.
  2. Objective C and Flutter will be a wise choice if you want to develop a super-fast iOS app.
  3. For the apps with high load calculations Flutter is a good option for both, Android and iOS app development.
Please let inVerita know if you struggle with picking a mobile tool for development, always happy to help.

Authors:
Ihor Demedyuk, Co-founder and CTO @ inVerita
Nazar Tsybulskyi, Flutter evangelist @ inVerita

Komentar

Postingan populer dari blog ini

PEMAKAIAN FONT FONT KHUSUS UNTUK SIMBOL SIMBOL NOTASI ANGKA LAGU

  PEMAKAIAN FONT FONT KHUSUS UNTUK SIMBOL SIMBOL NOTASI ANGKA LAGU Bagaimana kalau di dalam applikasi pertitur notasi angka dibuatkan sistem teks dengan memakai font parnumstion untuk membuat simbol simbol pada notasi angka lagu Menggunakan font khusus seperti **Parnumstion** untuk membuat simbol-simbol pada notasi angka dalam aplikasi pertitur dapat menjadi solusi yang elegan untuk menampilkan simbol notasi secara visual menarik dan konsisten. Berikut adalah langkah-langkah umum yang dapat kamu lakukan untuk mengimplementasikan sistem teks dengan font ini dalam aplikasi Python, khususnya jika kamu menggunakan tkinter: ### Langkah-langkah Implementasi: 1. **Pastikan Font Tersedia:**    - Unduh dan instal font **Parnumstion** pada sistem yang akan menjalankan aplikasi. Font ini harus diinstal agar bisa digunakan oleh aplikasi tkinter.    - Kamu dapat menempatkan file font (biasanya dengan ekstensi `.ttf`) di folder aplikasi atau menginstalnya secara manual di sis...

Cara Membuat Config HTTP Custom

  Lompat ke konten Lompat ke sidebar Lompat ke footer KANGARIF.NET × Beranda   /  android   /  internet gratis Cara Membuat Config HTTP Custom Oleh bustami    12/13/2020    15 komentar Di artikel kali ini saya akan membagikan tutorial bagaimana  cara membuat config HTTP Custom . Daftar isi 1  Apa itu HTTP Custom ? 2  Apa itu Config HTTP Custom ? 3  Cara Membuat Config HTTP Custom 3.1  Membuat Config HTTP Custom dengan Metode SSL/SNI 4  Penutup Apa itu HTTP Custom ? HTTP Custom  adalah sebuah aplikasi Android yang saat ini banyak dipakai oleh para pecinta internet gratis (gretonger). Kepopuleran aplikasi ini bisa dibilang sebanding atau bahkan lebih bila dibandingkan dengan aplikasi sejenis yang lebih dulu populer, yaitu HTTP Injector. Saat ini HTTP Custom banyak dipakai untuk mengubah kuota internet tertentu dari operator seluler menjadi bisa digunakan untuk semua aplikasi. Seperti misalnya yang saat ini sed...

Error “ Unable To Locate Package ”

  CadeMedia Media Informasi Terbaru 2023 8 Cara Mengatasi “Tidak Dapat Menemukan Paket Termux” di HP Android TERAKHIR DIPERBARUI 16 SEPTEMBER 2023 Error “  Unable To Locate Package  ” adalah masalah yang sering dialami oleh pengguna Termux. Ini terjadi ketika Termux tidak dapat menemukan  paket  yang hendak diinstal. Salah satu contohnya ketika Anda mencoba menginstal  paket  seperti git. Termux adalah aplikasi terminal  emulator  dan  environment  berbasis Linux untuk perangkat Android. Sehingga pengguna dapat menjalankan perintah dan aplikasi Linux tanpa perlu akses  root  atau mengutak-atik sistem Android. Nah, arti dari  tidak dapat menemukan paket  adalah Termux tidak dapat menemukan lokasi atau keberadaan  paket  ingin Anda  install  . Pada artikel kali ini CadeMedia bahas tuntas, penyebab hingga cara mengatasi pesan  error  pada Termux yang sering muncul. Simak penjelasan di b...