View Single Post
Capt'n Corrupt's Avatar
Posts: 3,524 | Thanked: 2,958 times | Joined on Oct 2007 @ Delta Quadrant
#2308
Here's a much more complete explanation of Renderscript.
http://android-developers.blogspot.c...derscript.html

For those that don't know, Renderscript is a high-performance, platform/architecture agnostic language for Android (circa v1.6) that has been made available to developers as of Honeycomb (v3.0).

There are a few things that are interesting with this implementation:

1) The language is actually C99 with full support for the facilities of this language. However, it is compiled to a LLVM bitcode and then translated to native code at runtime (AFAIK). As such Renderscript is as portable as Java.

2) It includes very easy to use hooks into Dalvik for simple integration for performance critical code. Things like image manipulation, 3D transformations, etc can be the target of this language and callable from Dalvik with a single line.

3) Renderscript is as fast as C/C++.

Since renderscript is older than the Dalvik JIT, I can understand the rational for creating it. However, I wonder if dalvik is currently sufficient for many of the originally-intended Renderscript tasks. Dalvik's JIT promises that the majority of the runtime is actually native and not interpreted with a minimal memory cost.

However, the most interesting part of this, is that they've managed to create a portable C after compilation. Taken a step further, it may be possible to use the LLVM bitcode to make general C/C++ binaries portable. The implications are quite large indeed.
 

The Following User Says Thank You to Capt'n Corrupt For This Useful Post: