zoukankan      html  css  js  c++  java
  • Profile Guided Optimization Link Time Optimization

     

    https://github.com/python/cpython

     

    Profile Guided Optimization

    PGO takes advantage of recent versions of the GCC or Clang compilers. If used, either via configure --enable-optimizations or by manually running make profile-opt regardless of configure flags, the optimized build process will perform the following steps:

    The entire Python directory is cleaned of temporary files that may have resulted from a previous compilation.

    An instrumented version of the interpreter is built, using suitable compiler flags for each flavour. Note that this is just an intermediary step. The binary resulting from this step is not good for real life workloads as it has profiling instructions embedded inside.

    After the instrumented interpreter is built, the Makefile will run a training workload. This is necessary in order to profile the interpreter execution. Note also that any output, both stdout and stderr, that may appear at this step is suppressed.

    The final step is to build the actual interpreter, using the information collected from the instrumented one. The end result will be a Python binary that is optimized; suitable for distribution or production installation.

    Link Time Optimization

    Enabled via configure's --with-lto flag. LTO takes advantage of the ability of recent compiler toolchains to optimize across the otherwise arbitrary .o file boundary when building final executables or shared libraries for additional performance gains.

  • 相关阅读:
    Elastic-Job
    Redis之Ubuntu下Redis集群搭建
    设计模式之单例模式
    设计模式之简单工厂模式
    Java集合(一)HashMap
    数据结构和算法(四)归并排序
    数据结构和算法(三)希尔排序
    数据结构和算法(二)插入排序
    博客转移通知
    C语言回调函数总结
  • 原文地址:https://www.cnblogs.com/rsapaper/p/13064248.html
Copyright © 2011-2022 走看看