Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Because the NDK is well-suited for computationally intensive applications, I wanted to find an example where we can implement a relatively simple algorithm in both native code and Java to compare their relative speeds.
So I picked a Fibonacci algorithm as the example. It’s a fairly simple algorithm that can be implemented easily in both C and Java. Additionally, we can implement it recursively as well as iteratively.