zoukankan      html  css  js  c++  java
  • MCPS & MIPS

    MIPS:Million Instructions Per Second

    MCPS:Million Cycles Per Second

    MIPS = Total Instructions*Sampling frequency/(No of frames * Samples per frame*1000000)

    MCPS = Total Cycles*Sampling frequency/(No of frames * Samples per frame*1000000)
    MHz is same as MCPS

    And as we know , some instructions may take more than 1 cycle ,so sometimes MIPS >= MCPS.

    But as the Parallel Processing technique developing, one cycle can excute more than one  instruction, so sometime MCPS>=MIPS

    Also some time the frame length is not uniform, so the they will be

    MIPS = Total Instructions/(Total playout time *1000000)

    MHz=MCPS = Total Cycles/(Total playout time*1000000)

    For example:

    struct timespec start, end;

    unsinged long diff_ns;

    clock_gettime(CLOCK_THREAD_CPUTIME_ID, &start);

    process()// process fixed in CPU core, process N samples;

    clock_gettime(CLOCK_THREAD_CPUTIME_ID, &end);

    diff_ns = (end.tv_sec - start.tv_sec) * 1000000000 + (end.tv_nsec - start.tv_nsec) ;

    cpu_freq: 1GHz. 1秒钟经过的时钟周期

    Cycles是处理N个samples所需要的时钟周期

    Cyles:diff_ns * cpu_freq = (diff_ns / 1000000000) * 1 GHz =  (diff_ns / 1000000000) * 1000000000Hz;

    处理N个samples所需要的时间为:N samples / sampling frequency

    MCPS = (Cycles / (N Samples / Sample Frequency)) / 1000000;

  • 相关阅读:
    Unity3D-ScrollRect 各参数的代码引用以及作用
    Unity3D-坐标转换笔记
    angularJS中XHR与promise
    angularJS中的事件
    angularJS中如何写服务
    angularJS中如何写自定义指令
    angularJS内置指令一览
    angularJS中如何写控制器
    理解angularJS中作用域$scope
    如何写angularJS模块
  • 原文地址:https://www.cnblogs.com/fellow1988/p/12283539.html
Copyright © 2011-2022 走看看