Performance evaluation of a KNN algorithm implementation using Rust-Webassembly
Abstract
In the context of rapid development of edge computing, shifting processing from server-side to client-side is increasingly important to reduce latency, enhance data security, and support real-time applications such as IoT or artificial intelligence (AI) applications on devices like web browsers in particular and edge devices (e.g., IoT devices, smartphones, or hardware with limited resources...) in general. WebAssembly (WASM) is a technology that supports operations on these devices with near-native speed and portability during deployment. In this paper, we evaluate the performance of the K-Nearest Neighbors (KNN) algorithm implemented in the Rust language and compiled to WebAssembly, and compare it with various other KNN implementations in web environments. The objective is to assess the capabilities of WASM and the KNN algorithm, thereby opening up research directions for implementing other machine learning models that require substantial computational power, utilizing WASM on edge devices to optimize machine learning applications.