Arm Gravition Versus X86 on Fibonaci and FFT Running Time

Summary

According to AWS Graviton2 the Arm Graviton provides 34% better price performance than X86. In some sense, it runs faster 34% compared with X86. So I do a small experiment to check this. AWS CDK and CodeBuild with Arm based instance …


This content originally appeared on DEV Community and was authored by Hai Tran

Summary

According to AWS Graviton2 the Arm Graviton provides 34% better price performance than X86. In some sense, it runs faster 34% compared with X86. So I do a small experiment to check this. AWS CDK and CodeBuild with Arm based instance makes it easy to setup. So the Graviton does run about 30% faster than X86. GitHub

  • Runtime Python 3.8
  • Numpy 1.22.1
  • Lambda memory 2048MB
  • Lambda timeout 10 seconds

CDK Pipeline

CDK make it very friendly to build this pipeline, feeling like pure programming infrastructure.
156108554-8f6f728f-cf18-4a08-b0df-2d9773e860aa

Running time for Fibonaci

def recur_fibo(n):
    if n <= 1:
        return n
    else:
        return(recur_fibo(n-1) + recur_fibo(n-2))

n = 30 used for testing.
123456

Running time for FFT single thread

data = np.random.rand(8192, 8192)
np.fft.fft(data, axis=0)

single_thread_fft

Running time for FFT multi-thread (Lambda memory 10240MB)

data = [np.random.rand(8192, 2048) for k in range(4)]
with ThreadPoolExecutor(max_worker=4) as executor:
  for x in data:
    executor.submit(np.fft.fft, x, axis=0)

multi_thread_fft_1


This content originally appeared on DEV Community and was authored by Hai Tran


Print Share Comment Cite Upload Translate Updates
APA

Hai Tran | Sciencx (2022-03-23T00:12:42+00:00) Arm Gravition Versus X86 on Fibonaci and FFT Running Time. Retrieved from https://www.scien.cx/2022/03/23/arm-gravition-versus-x86-on-fibonaci-and-fft-running-time/

MLA
" » Arm Gravition Versus X86 on Fibonaci and FFT Running Time." Hai Tran | Sciencx - Wednesday March 23, 2022, https://www.scien.cx/2022/03/23/arm-gravition-versus-x86-on-fibonaci-and-fft-running-time/
HARVARD
Hai Tran | Sciencx Wednesday March 23, 2022 » Arm Gravition Versus X86 on Fibonaci and FFT Running Time., viewed ,<https://www.scien.cx/2022/03/23/arm-gravition-versus-x86-on-fibonaci-and-fft-running-time/>
VANCOUVER
Hai Tran | Sciencx - » Arm Gravition Versus X86 on Fibonaci and FFT Running Time. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/03/23/arm-gravition-versus-x86-on-fibonaci-and-fft-running-time/
CHICAGO
" » Arm Gravition Versus X86 on Fibonaci and FFT Running Time." Hai Tran | Sciencx - Accessed . https://www.scien.cx/2022/03/23/arm-gravition-versus-x86-on-fibonaci-and-fft-running-time/
IEEE
" » Arm Gravition Versus X86 on Fibonaci and FFT Running Time." Hai Tran | Sciencx [Online]. Available: https://www.scien.cx/2022/03/23/arm-gravition-versus-x86-on-fibonaci-and-fft-running-time/. [Accessed: ]
rf:citation
» Arm Gravition Versus X86 on Fibonaci and FFT Running Time | Hai Tran | Sciencx | https://www.scien.cx/2022/03/23/arm-gravition-versus-x86-on-fibonaci-and-fft-running-time/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.