Topics

Speed comparison x86 versus ARM

Richard Russell
 

I have recently acquired a new smartphone, which is one of the fastest currently available (the OnePlus 5, using a Snapdragon 835 CPU). I thought it would be interesting to compare the speed of BBCSDL running on that with it running on an Intel Core i7 clocked at about 2.8 GHz.

I should add that of course the comparison here is not just between CPUs but between an interpreter written in hand-crafted assembler code (x86) and one compiled from C source (ARM). That is why the speed ratios are so variable depending on the nature of the operation performed.

It's also important to appreciate that the ARM has no 80-bit floats (BBCSDL uses 64-bit floats instead) so figures listed as being for that data type cannot be meaningfully compared.

As you will see from the linked results, the ARM is typically between 2 and 4 times slower than the x86, but really such a relatively small factor is remarkable in the circumstances. Not only that, but a few of the timing tests actually show the ARM running at a comparable speed to the x86, and in one case (NEXT N#) actually faster!!

I must say I find the results surprising and it really shows how ARM performance has improved, even though it is still a relatively low-power CPU. It also suggests the C compiler is doing a good job. I could speed up the ARM version even more by stripping out all the code which handles 80-bit floats, but I don't want to do that.

Richard.