问题
Android Studio --> Open Module Settings --> Build Types --> Renderscript Optim Level --> (3) // by default
What is "Rendercript Optim Level" best value?
回答1:
It's best to use the default "optim" level 3.
In the renderscript source, level 3 corresponds to the value llvm::CodeGenOpt::Aggressive in the slang compiler.
It's the argument that sets the level of optimization slang uses to compile the .rs
file into the intermediate bitcode (.bc
) file that get shipped with your app.
Interestingly, the optim level is included in the script's .bc
file, but ignored by the bcc compiler that finishes preparing the script on the device. It just discards the value and sets it to llvm::CodeGenOpt::Aggressive
no matter what.
sources:
Where is the RenderScript source code
来源:https://stackoverflow.com/questions/43025223/what-is-rendercript-optim-level