Tagged articles

Native interface

4 articles · Page 1 of 1
51CTO HarmonyOS Developer Community
51CTO HarmonyOS Developer Community
Jun 26, 2026 · Mobile Development

HarmonyOS Float Precision Pitfalls: Choosing the Right Type for Sensor Data

This article explores floating-point precision issues in HarmonyOS development, demonstrating how float's 7-digit limit corrupts sensor data, why double increases memory 30% and fails in Native calls, and why BigDecimal kills real-time performance, concluding with a scenario-based selection strategy and validation mechanism.

BigDecimalHarmonyOSMemory Optimization
0 likes · 10 min read
HarmonyOS Float Precision Pitfalls: Choosing the Right Type for Sensor Data
vivo Internet Technology
vivo Internet Technology
Aug 17, 2022 · Backend Development

Can JNI Supercharge Your Java Services? A Hands‑On Performance Journey

Facing heavy GC overhead and slow model inference in a Java compute service, the authors explore using Java Native Interface to offload file loading and regression calculations to C++, detailing environment setup, Maven integration, native method implementation, common pitfalls, performance testing with JMH, and achieving up to 80% latency reduction.

C++JNIJava
0 likes · 20 min read
Can JNI Supercharge Your Java Services? A Hands‑On Performance Journey
UCloud Tech
UCloud Tech
Mar 14, 2018 · Backend Development

How to Call C/C++ Libraries from Java Using JNA: A Practical Guide

This article explains how to access native C/C++ functions and complex structures from Java using JNI, JNA, and SWIG, compares their trade‑offs, provides type‑mapping tables, detailed code examples for struct definitions, passing, and callbacks, and offers practical tips for reliable cross‑language integration.

C++JNAJNI
0 likes · 9 min read
How to Call C/C++ Libraries from Java Using JNA: A Practical Guide