File tree 2 files changed +29
-0
lines changed
2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,12 @@ target_link_libraries(litterer_static PRIVATE Threads::Threads)
32
32
33
33
add_executable (microbenchmark-pages microbenchmark-pages.cpp)
34
34
target_link_libraries (microbenchmark-pages PRIVATE Threads::Threads)
35
+ if (MBP_OBJECT_DISTANCE)
36
+ target_compile_definitions (microbenchmark-pages PUBLIC OBJECT_DISTANCE=${MBP_OBJECT_DISTANCE} )
37
+ endif ()
38
+ if (MBP_OBJECT_SIZE)
39
+ target_compile_definitions (microbenchmark-pages PUBLIC OBJECT_SIZE=${MBP_OBJECT_SIZE} )
40
+ endif ()
35
41
36
42
if (NOT WIN32 )
37
43
message (STATUS "Downloading and configuring mimalloc" )
Original file line number Diff line number Diff line change
1
+ ## Microbenchmark
2
+
3
+ Here are instructions on running and tuning the ` microbenchmark-pages ` target.
4
+
5
+ ``` bash
6
+ # On Windows
7
+ % cmake src -B build
8
+ % cmake --build build --config Release
9
+ % ./build/Release/microbenchmark-pages.exe
10
+
11
+ # On other platforms
12
+ % cmake src -B build -DCMAKE_BUILD_TYPE=Release
13
+ % cmake --build build
14
+ % ./build/microbenchmark-pages.exe
15
+
16
+ # TODO: Maybe these can be merged into one, just needs testing.
17
+ ```
18
+
19
+ Settings can be set using CMake at configuration time (the first step).
20
+
21
+ ``` bash
22
+ % cmake src -B build -DMBP_OBJECT_SIZE=32 -DMBP_OBJECT_DISTANCE=4096
23
+ ```
You can’t perform that action at this time.
0 commit comments