- $ cat open_x_c_100times.c
- #include <windows.h>
- int main() {
- CreateFileA("x.c", GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING, 0, 0);
- for(int i=0;i<100000;i++) {
- HANDLE h;
- h = CreateFileA("x.c", GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING, 0, 0);
- CloseHandle(h);
- }
- return 0;
- }
- # with collapsing enabled:
- $ time ./open_x_c_100times
- real 3m20.027s
- user 0m0.562s
- sys 0m34.296s
- # collapsing disabled:
- $ time ./open_x_c_100times
- real 6m59.528s
- user 0m1.155s
- sys 0m48.936s
RDBSS collapsing benchmark #001
Posted by Anonymous on Fri 28th Nov 2025 11:58
raw | new post
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.
nrubsig.kpaste.net RSS