久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

  • <legend id='JttEW'><style id='JttEW'><dir id='JttEW'><q id='JttEW'></q></dir></style></legend>
  • <small id='JttEW'></small><noframes id='JttEW'>

    <tfoot id='JttEW'></tfoot>
    <i id='JttEW'><tr id='JttEW'><dt id='JttEW'><q id='JttEW'><span id='JttEW'><b id='JttEW'><form id='JttEW'><ins id='JttEW'></ins><ul id='JttEW'></ul><sub id='JttEW'></sub></form><legend id='JttEW'></legend><bdo id='JttEW'><pre id='JttEW'><center id='JttEW'></center></pre></bdo></b><th id='JttEW'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='JttEW'><tfoot id='JttEW'></tfoot><dl id='JttEW'><fieldset id='JttEW'></fieldset></dl></div>

          <bdo id='JttEW'></bdo><ul id='JttEW'></ul>

        當 QueryPerformanceCounter 被調用時會發生什么?

        What happens when QueryPerformanceCounter is called?(當 QueryPerformanceCounter 被調用時會發生什么?)

        • <bdo id='EJRSr'></bdo><ul id='EJRSr'></ul>
              <tfoot id='EJRSr'></tfoot>

                <i id='EJRSr'><tr id='EJRSr'><dt id='EJRSr'><q id='EJRSr'><span id='EJRSr'><b id='EJRSr'><form id='EJRSr'><ins id='EJRSr'></ins><ul id='EJRSr'></ul><sub id='EJRSr'></sub></form><legend id='EJRSr'></legend><bdo id='EJRSr'><pre id='EJRSr'><center id='EJRSr'></center></pre></bdo></b><th id='EJRSr'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='EJRSr'><tfoot id='EJRSr'></tfoot><dl id='EJRSr'><fieldset id='EJRSr'></fieldset></dl></div>

                  <tbody id='EJRSr'></tbody>
                <legend id='EJRSr'><style id='EJRSr'><dir id='EJRSr'><q id='EJRSr'></q></dir></style></legend>
              • <small id='EJRSr'></small><noframes id='EJRSr'>

                  本文介紹了當 QueryPerformanceCounter 被調用時會發生什么?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  我正在研究在我們的系統中使用 QueryPerformanceCounter 的確切含義,并試圖了解它對應用程序的影響.從我的 4 核單 CPU 機器上運行它可以看出,它需要大約 230ns 才能運行.當我在 24 核 4 cpu xeon 上運行它時,它需要大約 1.4 毫秒才能運行.更有趣的是,在我的機器上以多個線程運行時,它們不會相互影響.但是在多 CPU 機器上,線程會引起某種交互,導致它們相互阻塞.我想知道總線上是否有一些他們都查詢的共享資源?當我調用 QueryPerformanceCounter 時到底發生了什么,它真正衡量的是什么?

                  I'm looking into the exact implications of using QueryPerformanceCounter in our system and am trying to understand it's impact on the application. I can see from running it on my 4-core single cpu machine that it takes around 230ns to run. When I run it on a 24-core 4 cpu xeon it takes around 1.4ms to run. More interestingly on my machine when running it in multiple threads they don't impact each other. But on the multi-cpu machine the threads cause some sort of interaction that causes them to block each other. I'm wondering if there is some shared resource on the bus that they all query? What exactly happens when I call QueryPerformanceCounter and what does it really measure?

                  推薦答案

                  Windows QueryPerformanceCounter() 具有確定處理器數量并在必要時調用同步邏輯的邏輯.它嘗試使用 TSC 寄存器,但對于多處理器系統,不能保證該寄存器在處理器之間同步(更重要的是,由于智能降頻和睡眠狀態,可能會有很大差異).

                  Windows QueryPerformanceCounter() has logic to determine the number of processors and invoke syncronization logic if necessary. It attempts to use the TSC register but for multiprocessor systems this register is not guaranteed to be syncronized between processors (and more importantly can vary greatly due to intelligent downclocking and sleep states).

                  MSDN 說調用哪個處理器無關緊要,因此您可能會看到額外的同步代碼導致這種情況的開銷.另請記住,它可以調用總線傳輸,因此您可能會看到總線爭用延遲.

                  MSDN says that it doesn't matter which processor this is called on so you may be seeing extra syncronization code for such a situation cause overhead. Also remember that it can invoke a bus transfer so you may be seeing bus contention delays.

                  如果可能,請嘗試使用 SetThreadAffinityMask() 將其綁定到特定處理器.否則,您可能不得不忍受延遲,或者您可以嘗試不同的計時器(例如查看 http://en.wikipedia.org/wiki/High_Precision_Event_Timer).

                  Try using SetThreadAffinityMask() if possible to bind it to a specific processor. Otherwise you might just have to live with the delay or you could try a different timer (for example take a look at http://en.wikipedia.org/wiki/High_Precision_Event_Timer).

                  這篇關于當 QueryPerformanceCounter 被調用時會發生什么?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  In what ways do C++ exceptions slow down code when there are no exceptions thown?(當沒有異常時,C++ 異常會以何種方式減慢代碼速度?)
                  Why catch an exception as reference-to-const?(為什么要捕獲異常作為對 const 的引用?)
                  When and how should I use exception handling?(我應該何時以及如何使用異常處理?)
                  Scope of exception object in C++(C++中異常對象的范圍)
                  Catching exceptions from a constructor#39;s initializer list(從構造函數的初始化列表中捕獲異常)
                  Difference between C++03 throw() specifier C++11 noexcept(C++03 throw() 說明符 C++11 noexcept 之間的區別)

                  1. <tfoot id='EivLS'></tfoot>

                    <small id='EivLS'></small><noframes id='EivLS'>

                            <bdo id='EivLS'></bdo><ul id='EivLS'></ul>
                            <i id='EivLS'><tr id='EivLS'><dt id='EivLS'><q id='EivLS'><span id='EivLS'><b id='EivLS'><form id='EivLS'><ins id='EivLS'></ins><ul id='EivLS'></ul><sub id='EivLS'></sub></form><legend id='EivLS'></legend><bdo id='EivLS'><pre id='EivLS'><center id='EivLS'></center></pre></bdo></b><th id='EivLS'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='EivLS'><tfoot id='EivLS'></tfoot><dl id='EivLS'><fieldset id='EivLS'></fieldset></dl></div>
                              <tbody id='EivLS'></tbody>
                            <legend id='EivLS'><style id='EivLS'><dir id='EivLS'><q id='EivLS'></q></dir></style></legend>

                            主站蜘蛛池模板: jav成人av免费播放 | www.av7788.com| 国产一区二区三区久久久久久久久 | 全部免费毛片在线播放网站 | 久久精品综合 | av天天看| 天天舔天天| 女同久久另类99精品国产 | 亚洲天堂久久新 | 日本超碰在线 | 久久伦理电影 | 美女久久久久久久 | 亚洲精品一区二区三区在线 | 亚洲精品自拍 | 国产精品久久久久久福利一牛影视 | 亚洲黄色片免费观看 | 免费在线观看成人 | 国产视频久久久 | 日韩欧美一区二区三区免费看 | 久草新在线| 成人二区| 超碰8 | 日本亚洲一区 | 国产免费看 | 久久成人18免费网站 | 国产91一区二区三区 | xxx视频 | 日韩美女在线看免费观看 | 一区二区三区免费 | 亚洲网站观看 | 韩日一区二区三区 | 国产一区二区三区在线 | 国产91久久精品一区二区 | 成人二区| 99re6在线视频 | 嫩草网| 超碰人人人人 | 久久精品超碰 | 亚洲精品麻豆 | 全免费a级毛片免费看视频免 | 国产精品久久久久久久久久久久 |