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

Pemograman R Studio

  Metode Numerik Menggunakan R Pengantar Gambaran Isi Buku Cara Berkontribusi dalam Buku Ini Ucapan Terima Kasih Lisensi 1  Bahasa Pemrograman R 1.1  Sejarah R 1.2  Fitur dan Karakteristik R 1.3  Kelebihan dan Kekurangan R 1.4  RStudio 1.5  Menginstall R dan RStudio 1.6  Working Directory 1.6.1  Mengubah Lokasi Working Directory 1.6.2  Mengubah Lokasi Working Directory Default 1.7  Memasang dan Mengaktifkan Paket R 1.8  Fasilitas Help 1.8.1  Mencari Help dari Suatu Perintah Tertentu 1.8.2  General Help 1.8.3  Fasilitas Help Lainnya 1.9  Referensi 2  Kalkulasi Menggunakan R 2.1  Operator Aritmatik 2.2  Fungsi Aritmetik 2.3  Operator Relasi 2.4  Operator Logika 2.5  Memasukkan Nilai Kedalam Variabel 2.6  Tipe dan Struktur Data 2.7  Vektor 2.7.1  Membuat vektor 2.7.2  Missing Values 2.7.3  Subset Pada Vektor 2.7.4  Operasi Matematis Menggunakan Vektor ...

MIGRASI DATABASE DARI SQLite KE MySQL (Part-1)

  MIGRASI DATABASE DARI SQLite KE MySQL (Part-1) Pemakaian yang mana lebih baik dalam membuat database_musik di mysql atau Exel yang cell Cell pada tabel dilakukan operasi fungsi logika matematika. Untuk keperluan membuat database atau tabel yang memerlukan operasi logika atau matematika, seperti yang Anda sebutkan, MySQL jauh lebih baik dibandingkan Excel. Berikut adalah beberapa alasan mengapa MySQL lebih disarankan: 1. **Kapasitas dan Skalabilitas**: MySQL dapat menangani jumlah data yang jauh lebih besar daripada Excel. Ini penting jika Anda berencana untuk menyimpan banyak data atau melakukan operasi yang kompleks di atas data tersebut. 2. **Kekuatan dan Kinerja**: MySQL dirancang khusus untuk memproses query dan operasi basis data dengan cepat. Ini termasuk operasi matematika, logika, dan agregasi data yang umum dilakukan dalam aplikasi. 3. **Fleksibilitas Struktur**: Dalam MySQL, Anda dapat dengan mudah menentukan struktur tabel yang kompleks dan melakukan kueri yang lebih r...

Cara Menjadi Pengembang Front End – Keterampilan Front End Web Dev

  Menyumbangkan Belajar coding —  kurikulum 3.000 jam gratis 10 JUNI 2022 / #PENGEMBANGAN UJUNG DEPAN Bagaimana Menjadi Pengembang Front End – Keterampilan Front End Web Dev Joel Olawanle Beberapa profesional dengan bayaran tertinggi di dunia adalah pengembang front-end.  Mereka menggunakan pengetahuan dan bakat mereka untuk merancang situs web yang menarik dan ramah pengguna. Pengembang front-end tidak memerlukan gelar atau sertifikat sekolah untuk bekerja.  Sebaliknya, mereka harus memahami dasar-dasar pengembangan front-end, bahasa pemrograman, dan kerangka kerja pengembangan front-end. Dalam panduan ini, Anda akan belajar bagaimana menjadi pengembang front end dengan terlebih dahulu memahami apa yang dimaksud dengan pengembangan front end, keterampilan teknis dan soft skill yang diperlukan, bahasa dan kerangka kerja yang tersedia, dan beberapa langkah untuk memulai. Seorang pengembang front-end di Amerika Serikat dapat memperoleh rata-rata $86,178 per tahun, menu...