Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Using the NDK Performantly - Best Practices and Optimization Techniques

Android Developers via YouTube

Overview

Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Explore best practices and optimization techniques for using the Native Development Kit (NDK) in Android applications in this 47-minute conference talk from the Big Android BBQ 2015. Delve into the intricacies of Java Native Interface (JNI) in Android, learning how to properly implement native components to enhance application performance rather than hinder it. Gain insights from Daniel, a five-year veteran of the Android team, as he covers topics such as JNI basics, caching field and method IDs, performance comparisons between Dalvik and ART runtimes, and efficient string handling. Discover techniques like using DirectByteBuffer, bulk fetching, and FastJNI declarations to optimize native code integration. Includes a demonstration using Android Studio to illustrate practical implementation of these concepts.

Syllabus

Intro
About Me
What is the NDK: Architecture View
The NDK: An Abridged History
Our Assumptions
Benchmarking our Runtime
JNI Basics: Accessing Class Fields
Cache Field/Method IDs
Performance: Field/Method IDs (ns)
Dalvik VS ART: GetintField
JNI Tips Scorecard
Use GetStringchars
Performance: GetString(UTF)Chars
Performance: Longer GetString(UTF)Chars
ART: GetString Chars vs GetStringUTFChars
ART: IsMovableObject
Use GetString Region
Performance: Copying String Data
Sharing Structured Data
Performance: Overhead of a JNI Call
Use DirectByteBuffer
Performance: GetDirectBuffer Address
Exploring ByteBuffer, direct ByteBuffer
Reading our Integer
FastJNI Declaration
Performance: Read Integer from ByteBuffer
Bulk Fetching
Performance: Copy and Readinteger
Demo: Android Studio

Taught by

Android Developers

Reviews

Start your review of Using the NDK Performantly - Best Practices and Optimization Techniques

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.