Content area

Abstract

Mobile and wearable devices are capable of executing increasingly complex and privacy-sensitive tasks, all while remaining bound by strict energy and latency constraints. This dissertation investi- gates how utilizing low-level code can improve performance and efficiency on Android devices in contrast to the standard Kotlin/Java toolchain. After reviewing the state of the art, four studies were conducted using both Kotlin and C/C++ with the Android Native Development Kit (NDK). These studies focused on prime number generation, using the Sieve of Eratosthenes, the Fast Fourier Transform (FFT), and square matrix multiplication. Additionally, we developed an Android ap- plication that performs wake word or hotword detection using TensorFlow Lite C API, followed by voice command recognition for a limited set of commands after detecting a wake word.

The exploration of the algorithms revealed that native code offers limited benefits for the Sieve algorithm, achieving only a 1.4x speed-up in the best-case scenario, with performance degrading as the input size increases. However, native code provides better control over memory usage, enabling the processing of larger input sizes than the Kotlin approach. The iterative FFT imple- mented in native code achieves a speed-up of 5.82x for an input size of 220, with performance improving as input size increases. While the matrix multiplication algorithm achieved a speed- up of 6x in a matrix size of 2048, utilizing the compiler's -O3 optimization flag, which enabled instruction vectorization.

Moreover, the development of the wake word detector and voice command recognition appli- cation using the TensorFlow Lite C API allowed on-device real-time processing while also incor- porating noise and voice activity filtering. One of our goals was to compare a native implementa- tion in C with one in Kotlin to explore potential optimizations. Empirical evaluation confirmed a functional audio pipeline that consumed approximately 200MB of memory and could sustain up to 41 hours of continuous listening in an environment composed of equal portions (33,3...% each) of silence, random noise, and human voice.

Details

1010268
Business indexing term
Title
Leveraging Low-Level Code Optimization on Mobile and Wearable Devices
Number of pages
85
Publication year
2025
Degree date
2025
School code
5896
Source
MAI 87/4(E), Masters Abstracts International
ISBN
9798297667297
University/institution
Universidade do Porto (Portugal)
University location
Portugal
Degree
M.C.E.
Source type
Dissertation or Thesis
Language
English
Document type
Dissertation/Thesis
Dissertation/thesis number
32269144
ProQuest document ID
3266812300
Document URL
https://www.proquest.com/dissertations-theses/leveraging-low-level-code-optimization-on-mobile/docview/3266812300/se-2?accountid=208611
Copyright
Database copyright ProQuest LLC; ProQuest does not claim copyright in the individual underlying works.
Database
2 databases
  • ProQuest One Academic
  • ProQuest One Academic