Project Stage 2: Profiling (x86_64)

Introduction
As the profiling I have done on the previous blog was using Aarch64 architecture, I will do profiling in x86_64 architecture and describe the result. I recommend to take a look at the previous blogs related to this project: Project Stage 1 - Compining and Benchmarking Butteraugli and Project Stage 2 - Profiling Butteraugli

The Project I Selected: Butteraugli
The Butteraugli is the project Google created. It estimates the psychovisual similarity of two images. The detailed information about this project is described on the Google Opensource website about the Butteraugli. The source code for this project is located here: GitHub - Butteraugli.

How to use gprof and perf
The detailed process of how to use gprof and perf for Butteraugli profiling is described in the Project Stage 2 - Profiling Butteraugli

Result of the prof in x86_64 architecture
Image size: 5mb

Image size: 10mb

Result of the perf in x86_64 architecture
Image size: 5mb

Image size: 10mb

Conclusion
I have checked the major functions takes the most time in this project are butteraugli::Convolution(butteraugli::Image<float> const&, std::vector<float>, std::vector<float, std::allocator<float>> const&, float) and std::vector<float, std::allocator<float> >::operator[](unsigned long) in both the Aarch64 and x86_64 architectures. Therefore, If I optimize those functions, this project can be faster in both Aarch64 and x86_64 architecture.

Reflection
As I have already done profiling in Aarch64 architecture, profiling in x86_64 architecture is not difficult. I have fun profiling this project. I will focus on two functions take the most time for this project, optimize them, and blog the result on the stage 3 post.

Comments

Popular posts from this blog

Open Source Project: Lab2 (Pull Request)

Release 4.0 - Part 3: Release

Lab 8: Automated Testing and Continuous Integration