-3

I've read some articles about Android NDK. Most of them claim Native C is faster than Java but they didn't explain the reasons. Could anybody explain and give sources why is Native C faster?

4

1 回答 1

0

Java 必须由虚拟机解释,而 C 直接与系统通信。问题是,由于必须解释 java,因此您可以说它在执行某些操作时必须通过检查点,而 C 具有直接通过。但是那个虚拟机也有一些优势。例如,它允许代码几乎可以在任何系统上运行。相比之下,C 依赖于机器。

于 2012-06-12T00:21:20.620 回答