Neon Instruction Support for csmUpdateModel Calculation
Updated: 09/03/2019
The Live2D Cubism Core Ver3.0.4 version upgrade supports the NEON instruction.
This speeds up the execution of the csmUpdateModel(csmModel* model) instruction by about 40% on supported CPUs.
How to Confirm Application
Check the Version of Cubism Core.
If the version is 3.0.4 or higher in csmGetVersion(), it is applied.
Effect Range
CPUs supporting ARM-based NEON instructions are eligible.
Smartphones and other devices are the main targets.
Effectiveness Verification
Experimental conditions
Device | Nexus 5 X Android 8.0.0 |
Verification model | Jin Natori |
Miara | |
Haru accompanied by Cubism SDK for Native | |
Experimental procedure | 1. Create a set of 100 parameters that randomly change all parameter values |
2. Perform csmModelUpdate 100 times with the same parameter set for the model for non-NEON and the model for NEON, and record the execution time | |
3. Confirm that the results of non-NEON and NEON calculations are consistent | |
4. Repeat steps 1-2 for 200 repetitions, in sets of 5 |
Experimental results
The figures above are graphs of the total of 100 Update times for each model, in milliseconds.
In all models, NEON’s execution speed is superior to that of the existing calculation method, C.
The above figure shows a histogram of speed ratios calculated by C/NEON for each of the 100 integrated times.
It can be seen that the speed ratios for each model are concentrated roughly around 1.40.
The speed ratio average and standard deviations for each model are shown below.
Speed ratio average | Standard deviation | |
Natori | 1.429702014 | 0.06952474578 |
miara | 1.414569343 | 0.04765946939 |
Haru | 1.40589412 | 0.02436108084 |