Add a simple benchmark of wxDisplaySize() and related functions

This benchmark shows that wxGetDisplaySize() has only minimal overhead
compared to wxDisplaySize(), but wxDisplay().GetGeometry() is almost 3
times slower (under wxGTK).
This commit is contained in:
Vadim Zeitlin
2018-09-30 00:29:02 +02:00
parent b4aaa10032
commit d6793893c0
9 changed files with 58 additions and 0 deletions

View File

@@ -51,6 +51,7 @@ BENCH_GUI_CXXFLAGS = /M$(__RUNTIME_LIBS_26)$(__DEBUGRUNTIME) /DWIN32 \
/DNOPCH /D_CONSOLE $(__RTTIFLAG) $(__EXCEPTIONSFLAG) $(CPPFLAGS) $(CXXFLAGS)
BENCH_GUI_OBJECTS = \
$(OBJS)\bench_gui_bench.obj \
$(OBJS)\bench_gui_display.obj \
$(OBJS)\bench_gui_image.obj
BENCH_GUI_RESOURCES = \
$(OBJS)\bench_gui_sample.res
@@ -512,6 +513,9 @@ $(OBJS)\bench_gui_sample.res: .\..\..\samples\sample.rc
$(OBJS)\bench_gui_bench.obj: .\bench.cpp
$(CXX) /c /nologo /TP /Fo$@ $(BENCH_GUI_CXXFLAGS) .\bench.cpp
$(OBJS)\bench_gui_display.obj: .\display.cpp
$(CXX) /c /nologo /TP /Fo$@ $(BENCH_GUI_CXXFLAGS) .\display.cpp
$(OBJS)\bench_gui_image.obj: .\image.cpp
$(CXX) /c /nologo /TP /Fo$@ $(BENCH_GUI_CXXFLAGS) .\image.cpp