<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>WP</title>
    <description>blog </description>
    <link>https://giantpanpan.github.io/</link>
    <atom:link href="https://giantpanpan.github.io/feed.xml" rel="self" type="application/rss+xml"/>
    <pubDate>Sat, 14 Dec 2019 01:23:05 +0000</pubDate>
    <lastBuildDate>Sat, 14 Dec 2019 01:23:05 +0000</lastBuildDate>
    <generator>Jekyll v3.8.5</generator>
    
      <item>
        <title>SPO600 Overview</title>
        <description>
Overall, SPO600 is one of the most useful and challenging course I ever take so far. The skills and knowledge it gives me is very practical and close to industry. The most important thing I learned is the methodology of software optimization, by deeply looking into real-world open source project. I believe it will be a very handy skill for my future career as a developer.

Software Optimization is a broad and complicated topic because it involves so many things, such as computer architecture, low-level/machine language, compiler and so on. There is a long way to go if people really want to be good at it. SPO600 is a great start to enter this topic and I will continue to use the skills and knowledge I learned from this course to optimize software in industry and open source platform.

Thank you Professor!
</description>
        <pubDate>Fri, 13 Dec 2019 20:04:00 +0000</pubDate>
        <link>https://giantpanpan.github.io/2019/12/13/SPO600-Review/</link>
        <guid isPermaLink="true">https://giantpanpan.github.io/2019/12/13/SPO600-Review/</guid>
        
        <category>OpenCV</category>
        
        
        <category>SoftwareOptimization</category>
        
      </item>
    
      <item>
        <title>Program Performence</title>
        <description>&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#program-performance-is-bound-by&quot; id=&quot;markdown-toc-program-performance-is-bound-by&quot;&gt;&lt;strong&gt;Program Performance is bound by&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#how-to-solve-performance-issues-caused-by-memory-readwrite&quot; id=&quot;markdown-toc-how-to-solve-performance-issues-caused-by-memory-readwrite&quot;&gt;&lt;strong&gt;How to solve performance issues caused by memory Read/Write&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href=&quot;#why-move-operatormove-from-one-register-to-another-can-be-a-hot-spot-in-usage-&quot; id=&quot;markdown-toc-why-move-operatormove-from-one-register-to-another-can-be-a-hot-spot-in-usage-&quot;&gt;&lt;strong&gt;Why Move Operator(move from one register to another) can be a hot spot in usage? &lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;program-performance-is-bound-by&quot;&gt;&lt;strong&gt;Program Performance is bound by&lt;/strong&gt;&lt;/h2&gt;
&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;CPU&lt;/strong&gt;&lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Memory&lt;/strong&gt;
    &lt;ul&gt;
      &lt;li&gt;Memory will always prioritize read over write function to CPU, until the cache is running out&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;strong&gt;Input and Output&lt;/strong&gt;
    &lt;ul&gt;
      &lt;li&gt;Network Speed&lt;/li&gt;
      &lt;li&gt;Storage&lt;/li&gt;
      &lt;li&gt;Humans (compare total execution time with total time, if the gap is too large, it means machine is waiting for human input too long time)&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;how-to-solve-performance-issues-caused-by-memory-readwrite&quot;&gt;&lt;strong&gt;How to solve performance issues caused by memory Read/Write&lt;/strong&gt;&lt;/h2&gt;
&lt;ol&gt;
  &lt;li&gt;&lt;strong&gt;Make CPU job easier&lt;/strong&gt;
    &lt;ul&gt;
      &lt;li&gt;Reduce the size of data (e.g. JSON and html are bulky).&lt;/li&gt;
      &lt;li&gt;Make data compacted, not let them spread out in memory (memory fragmentation)&lt;/li&gt;
      &lt;li&gt;Localize access (put data we need to access close to each other)&lt;/li&gt;
      &lt;li&gt;Give hints to CPU (memory pre-fetch instructions for both read and write). We can give instructions to CPU, to warn it that we are likely to need a certain piece of data. CPU will go and tell the memory system that it is going to need that. If memory system is not busy, it will go and fetch that data into cache before CPU really need to use that.&lt;/li&gt;
    &lt;/ul&gt;
  &lt;/li&gt;
&lt;/ol&gt;

&lt;h2 id=&quot;why-move-operatormove-from-one-register-to-another-can-be-a-hot-spot-in-usage-&quot;&gt;&lt;strong&gt;Why Move Operator(move from one register to another) can be a hot spot in usage? &lt;/strong&gt;&lt;/h2&gt;
The problem is not move operation, it is the data is not ready yet. Another register is working with this data and it is not free to be move to another register. So the move operation will hang there and wait. So we always need to keep an eye on the time and usage of a software and find out where the hot spot is. If we can solve the hot spot, the overall performance of the software will be better.
</description>
        <pubDate>Fri, 13 Dec 2019 18:54:00 +0000</pubDate>
        <link>https://giantpanpan.github.io/2019/12/13/Program-Performance/</link>
        <guid isPermaLink="true">https://giantpanpan.github.io/2019/12/13/Program-Performance/</guid>
        
        <category>OpenCV</category>
        
        
        <category>SoftwareOptimization</category>
        
      </item>
    
      <item>
        <title>OpenCV Optimization Practice - Stage III</title>
        <description>&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#opencv-optimization---stage-iii&quot; id=&quot;markdown-toc-opencv-optimization---stage-iii&quot;&gt;&lt;strong&gt;OpenCV Optimization - Stage III&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;opencv-optimization---stage-iii&quot;&gt;&lt;strong&gt;OpenCV Optimization - Stage III&lt;/strong&gt;&lt;/h1&gt;

&lt;img src=&quot;https://giantpanpan.github.io/img/opencv.png&quot; alt=&quot;OpenCV&quot; /&gt;

Hi everyone, thank you for reading my blog! This is the final stage of my OpenCV Optimization Practice. In this stage, I need to finish the following tasks:
&lt;ul&gt;
  &lt;li&gt;Push the optimization to the upstream&lt;/li&gt;
  &lt;li&gt;Conclusion and Review of this project&lt;/li&gt;
&lt;/ul&gt;

</description>
        <pubDate>Fri, 13 Dec 2019 11:44:00 +0000</pubDate>
        <link>https://giantpanpan.github.io/2019/12/13/OpenCV-Optimization-stage3/</link>
        <guid isPermaLink="true">https://giantpanpan.github.io/2019/12/13/OpenCV-Optimization-stage3/</guid>
        
        <category>OpenCV</category>
        
        
        <category>SoftwareOptimization</category>
        
      </item>
    
      <item>
        <title>OpenCV Optimization Practice - Stage II Update</title>
        <description>&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#opencv-optimization---stage-ii-update-&quot; id=&quot;markdown-toc-opencv-optimization---stage-ii-update-&quot;&gt;&lt;strong&gt;OpenCV Optimization - Stage II Update &lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;opencv-optimization---stage-ii-update-&quot;&gt;&lt;strong&gt;OpenCV Optimization - Stage II Update &lt;/strong&gt;&lt;/h1&gt;

&lt;img src=&quot;https://giantpanpan.github.io/img/opencv.png&quot; alt=&quot;OpenCV&quot; /&gt;

There are the list of tasks I need to add for stage II:
&lt;ul&gt;
  &lt;li&gt;Perform: Details about the processes of performing optimiation plan&lt;/li&gt;
  &lt;li&gt;Safety Test: Will the optimized functions pass the safety test?&lt;/li&gt;
  &lt;li&gt;Performace Test: Compare the performance of target functions before and after optimization&lt;/li&gt;
  &lt;li&gt;Other Architecture: What is the preformance of the target functions in other platform?&lt;/li&gt;
&lt;/ul&gt;

</description>
        <pubDate>Thu, 12 Dec 2019 12:23:00 +0000</pubDate>
        <link>https://giantpanpan.github.io/2019/12/12/OpenCV-Optimization-stage2-update/</link>
        <guid isPermaLink="true">https://giantpanpan.github.io/2019/12/12/OpenCV-Optimization-stage2-update/</guid>
        
        <category>OpenCV</category>
        
        
        <category>SoftwareOptimization</category>
        
      </item>
    
      <item>
        <title>OpenCV Optimization Practice - Stage I Update</title>
        <description>&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#opencv-optimization---stage-i-update-&quot; id=&quot;markdown-toc-opencv-optimization---stage-i-update-&quot;&gt;&lt;strong&gt;OpenCV Optimization - Stage I Update &lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;opencv-optimization---stage-i-update-&quot;&gt;&lt;strong&gt;OpenCV Optimization - Stage I Update &lt;/strong&gt;&lt;/h1&gt;

&lt;img src=&quot;https://giantpanpan.github.io/img/opencv.png&quot; alt=&quot;OpenCV&quot; /&gt;

After discuss with my instructor, I realized that my OpenCV optimization stage I is not sufficient. 
There are the list of tasks I need to add for stage I:
&lt;ul&gt;
  &lt;li&gt;Test Host - Specify: which test host I will use for benchmaking.&lt;/li&gt;
  &lt;li&gt;Test Plan - Safety: What is the result of the test. Is it always returning same&amp;amp;correct result?&lt;/li&gt;
  &lt;li&gt;Test Plan - Performance: Display the  detailed performance of the test.&lt;/li&gt;
  &lt;li&gt;Optimization Plan: Explan why and how I am going to optimize target functions.&lt;/li&gt;
  &lt;li&gt;Other Architecture: What is the preformance of the test in other platform&lt;/li&gt;
&lt;/ul&gt;

</description>
        <pubDate>Mon, 09 Dec 2019 12:45:00 +0000</pubDate>
        <link>https://giantpanpan.github.io/2019/12/09/OpenCV-Optimization-stage1-update/</link>
        <guid isPermaLink="true">https://giantpanpan.github.io/2019/12/09/OpenCV-Optimization-stage1-update/</guid>
        
        <category>OpenCV</category>
        
        
        <category>SoftwareOptimization</category>
        
      </item>
    
      <item>
        <title>Software Portability and Atomics</title>
        <description>&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#software-portability&quot; id=&quot;markdown-toc-software-portability&quot;&gt;&lt;strong&gt;Software Portability&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;software-portability&quot;&gt;&lt;strong&gt;Software Portability&lt;/strong&gt;&lt;/h3&gt;
&lt;strong&gt;When we talk about software portability, we usually come up with 2 categories&lt;/strong&gt;
&lt;ol&gt;
  &lt;li&gt;portable software - cross-platform software, which can be transport from platfrom to platform&lt;/li&gt;
  &lt;li&gt;port software - software adopt to one platform&lt;/li&gt;
&lt;/ol&gt;

</description>
        <pubDate>Sun, 01 Dec 2019 20:32:00 +0000</pubDate>
        <link>https://giantpanpan.github.io/2019/12/01/Software-Optimization-atomics/</link>
        <guid isPermaLink="true">https://giantpanpan.github.io/2019/12/01/Software-Optimization-atomics/</guid>
        
        <category>GNUC</category>
        
        
        <category>SoftwareOptimization</category>
        
      </item>
    
      <item>
        <title>Important Issues for Benchmarking</title>
        <description>&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#what-is-benchmarking&quot; id=&quot;markdown-toc-what-is-benchmarking&quot;&gt;&lt;strong&gt;What is benchmarking&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;what-is-benchmarking&quot;&gt;&lt;strong&gt;What is benchmarking&lt;/strong&gt;&lt;/h3&gt;
Benchmarking is an important tool we use to access the relative performance of a software or specific component of a software, normally by running a number of standard tests and trials against it.

</description>
        <pubDate>Sun, 01 Dec 2019 19:42:00 +0000</pubDate>
        <link>https://giantpanpan.github.io/2019/12/01/Software-Optimization-benchmarking/</link>
        <guid isPermaLink="true">https://giantpanpan.github.io/2019/12/01/Software-Optimization-benchmarking/</guid>
        
        <category>GNUC</category>
        
        
        <category>SoftwareOptimization</category>
        
      </item>
    
      <item>
        <title>ifunc - GNU Indirect Function</title>
        <description>&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#ifunc-general-idea&quot; id=&quot;markdown-toc-ifunc-general-idea&quot;&gt;&lt;strong&gt;ifunc General Idea:&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&quot;ifunc-general-idea&quot;&gt;&lt;strong&gt;ifunc General Idea:&lt;/strong&gt;&lt;/h3&gt;
&lt;strong&gt;ifunc&lt;/strong&gt; is a special feature provided by GNUC which can help you to optimize your function call. 
It allows to create multiple implementations of one function. A best implementation can be selected during runtime for particular procesor.

</description>
        <pubDate>Sun, 01 Dec 2019 16:45:00 +0000</pubDate>
        <link>https://giantpanpan.github.io/2019/12/01/Software-Optimization-ifunc/</link>
        <guid isPermaLink="true">https://giantpanpan.github.io/2019/12/01/Software-Optimization-ifunc/</guid>
        
        <category>GNUC</category>
        
        
        <category>SoftwareOptimization</category>
        
      </item>
    
      <item>
        <title>OpenCV Optimization Practice - Stage II</title>
        <description>&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#opencv-optimization---stage-ii-&quot; id=&quot;markdown-toc-opencv-optimization---stage-ii-&quot;&gt;&lt;strong&gt;OpenCV Optimization - Stage II &lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1 id=&quot;opencv-optimization---stage-ii-&quot;&gt;&lt;strong&gt;OpenCV Optimization - Stage II &lt;/strong&gt;&lt;/h1&gt;

&lt;img src=&quot;https://giantpanpan.github.io/img/opencv.png&quot; alt=&quot;OpenCV&quot; /&gt;

In this blog, I will continue to work with openCV fast-math functions optimization. You can look at the source code of  &lt;a href=&quot;https://github.com/opencv/opencv&quot;&gt;OpenCV&lt;/a&gt; here.

</description>
        <pubDate>Sat, 30 Nov 2019 13:40:00 +0000</pubDate>
        <link>https://giantpanpan.github.io/2019/11/30/OpenCV-Optimization/</link>
        <guid isPermaLink="true">https://giantpanpan.github.io/2019/11/30/OpenCV-Optimization/</guid>
        
        <category>OpenCV</category>
        
        
        <category>SoftwareOptimization</category>
        
      </item>
    
      <item>
        <title>Software Optimization - Building Software</title>
        <description>&lt;ul id=&quot;markdown-toc&quot;&gt;
  &lt;li&gt;&lt;a href=&quot;#building-software&quot; id=&quot;markdown-toc-building-software&quot;&gt;&lt;strong&gt;Building Software&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2 id=&quot;building-software&quot;&gt;&lt;strong&gt;Building Software&lt;/strong&gt;&lt;/h2&gt;
This week we are going to discuss how to build a software. I need to learn more about it because I am going to try optimizing an open source package/library. In order to work with it, at least I need to build it successfully firstly. So let us take a look about the modern software building process.

</description>
        <pubDate>Sun, 10 Nov 2019 13:11:00 +0000</pubDate>
        <link>https://giantpanpan.github.io/2019/11/10/Software-Optimization-Building-Software/</link>
        <guid isPermaLink="true">https://giantpanpan.github.io/2019/11/10/Software-Optimization-Building-Software/</guid>
        
        <category>buildSoftware</category>
        
        
        <category>SoftwareOptimization</category>
        
      </item>
    
  </channel>
</rss>
