⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme.benchtests

📁 pthread source code,you can compile directly
💻 BENCHTESTS
字号:
------------Benchmarking------------There is a set a benchmarking programs in the"tests" directory. These should be runnable using thefollowing command-lines corresponding to each of the possiblelibrary builds:MSVC:nmake clean VC-benchnmake clean VCE-benchnmake clean VSE-benchMingw32:make clean GC-benchmake clean GCE-benchUWIN:The benchtests are run as part of the testsuite.Mutex benchtests----------------benchtest1 - Lock plus unlock on an unlocked mutex.benchtest2 - Lock plus unlock on a locked mutex.benchtest3 - Trylock on a locked mutex.benchtest4 - Trylock plus unlock on an unlocked mutex.Each test times up to three alternate synchronisationimplementations as a reference, and then times each ofthe four mutex types provided by the library. Each isdescribed below:Simple Critical Section- uses a simple Win32 critical section. There is noadditional overhead for this case as there is in theremaining cases.POSIX mutex implemented using a Critical Section- The old implementation which uses runtime adaptationdepending on the Windows variant being run on. Whenthe pthreads DLL was run on WinNT or higher thenPOSIX mutexes would use Win32 Critical Sections.POSIX mutex implemented using a Win32 Mutex- The old implementation which uses runtime adaptationdepending on the Windows variant being run on. Whenthe pthreads DLL was run on Win9x then POSIX mutexeswould use Win32 Mutexes (because TryEnterCriticalSectionis not implemented on Win9x).PTHREAD_MUTEX_DEFAULTPTHREAD_MUTEX_NORMALPTHREAD_MUTEX_ERRORCHECKPTHREAD_MUTEX_RECURSIVE- The current implementation supports these mutex types.The underlying basis of POSIX mutexes is now the sameirrespective of the Windows variant, and should thereforehave consistent performance.Semaphore benchtests--------------------benchtest5 - Timing for various uncontended cases.In all benchtests, the operation is repeated a largenumber of times and an average is calculated. Loopoverhead is measured and subtracted from all test times.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -