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 averageStandard deviation
Natori1.4297020140.06952474578
miara1.4145693430.04765946939
Haru1.405894120.02436108084

Data used to generate the graphs

Speed test 1000 times data

Was this article helpful?
YesNo
Please let us know what you think about this article.