zoukankan      html  css  js  c++  java
  • Given a compiled machine-language program, which statements in the source language cause the execution of the most machine-language instructions and what is the execution time of these instr

    COMPUTER ORGANIZATION AND ARCHITECTURE DESIGNING FOR PERFORMANCE NINTH EDITION

    A  variety  of  studies  have  been  made  to  analyze  the  behavior  of  HLL  programs.
    Table  4.8,  discussed  in  Chapter  4,  includes  key  results  from  a  number  of  studies.
    There is quite good agreement in the results of this mixture of languages and appli-
    cations. Assignment statements predominate, suggesting that the simple movement
    of  data  is  of  high  importance.  There  is  also  a  preponderance  of  conditional  state-
    ments  (IF,  LOOP).  These  statements  are  implemented  in  machine  language  with
    some sort of compare and branch instruction. This suggests that the sequence con-
    trol mechanism of the instruction set is important.
    These  results  are  instructive  to  the  machine  instruction  set  designer,  indicat-
    ing which types of statements occur most often and therefore should be supported
    in an “optimal” fashion. However, these results do not reveal which statements use
    the most time in the execution of a typical program. That is, we want to answer the
    question:  Given  a  compiled  machine-language  program,  which  statements  in  the
    source language cause the execution of the most machine-language instructions and
    what is the execution time of these instructions?
    To  get  at  this  underlying  phenomenon,  the  Patterson  programs  [PATT82a],
    described  in  Appendix  4A,  were  compiled  on  the  VAX,  PDP-11,  and  Motorola
    68000 to determine the average number of machine instructions and memory refer-
    ences per statement type. The second and third columns in Table 15.2 show the rela-
    tive  frequency  of  occurrence  of  various  HLL  statements  in  a  variety  of  programs;
    the  data  were  obtained  by  observing  the  occurrences  in  running  programs  rather
    than  just  the  number  of  times  that  statements  occur  in  the  source  code.  Hence
    these  metrics  capture  dynamic  behavior.  To  obtain  the  data  in  columns  four  and
    five (machine-instruction weighted), each value in the second and third columns is
    multiplied by the number of machine instructions produced by the compiler. These
    results  are  then  normalized  so  that  columns  four  and  five  show  the  relative  fre-
    quency  of  occurrence,  weighted  by  the  number  of  machine  instructions  per  HLL

    statement. Similarly, the sixth and seventh columns are obtained by multiplying the
    frequency of occurrence of each statement type by the relative number of memory
    references caused by each statement. The data in columns four through seven pro-
    vide  surrogate  measures  of  the  actual  time  spent  executing  the  various  statement
    types. The results suggest that the procedure call/return is the most time-consuming
    operation in typical HLL programs.
    The reader should be clear on the significance of Table 15.2. This table indi-
    cates the relative performance impact of various statement types in an HLL, when
    that HLL is compiled for a typical contemporary instruction set architecture. Some
    other architecture could conceivably produce different results. However, this study
    produces  results  that  are  representative  for  contemporary  complex  instruction  set
    computer  (CISC)  architectures.  Thus,  they  can  provide  guidance  to  those  looking
    for more efficient ways to support HLLs.

  • 相关阅读:
    noip宝藏
    [HNOI2008]玩具装箱TOY
    hdu 4372 Count the Buildings 轮换斯特林数
    bzoj 3000 Big Number 估算n!在k进制下的位数 斯特林公式
    自然数幂求和方法1:扰动法(求两次)
    斯特林数 学习笔记
    hdu 3625 Examining the Rooms 轮换斯特林数
    cf 472G Design Tutorial: Increase the Constraints 分块+压位/FFT
    chef and churu 分块 好题
    分块 学习笔记
  • 原文地址:https://www.cnblogs.com/rsapaper/p/6239089.html
Copyright © 2011-2022 走看看