glfw: reduce compilation units to bring iteration time down to ~90ms
This consistently shaves off about 40ms (~130ms -> ~90ms, 30% reduction) from build times when iterating. On Windows, I suspect the result will be much greater due to slow filesystem perf there and the fact that this reduces the # of files read. This was originally brought to my attention as a possibility by @meshula in hexops/dawn#2, the way this works is by reducing compilation units so that C headers only need to be read/parsed/interpreted once rather than once per individual C source file we are compiling. Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
c552148d0b
commit
3ec74222e6
9 changed files with 57 additions and 103 deletions
10
glfw/src/sources_windows.c
Normal file
10
glfw/src/sources_windows.c
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
#include "sources_all.c"
|
||||
|
||||
// Windows-specific sources
|
||||
#include "win32_thread.c"
|
||||
#include "wgl_context.c"
|
||||
#include "win32_init.c"
|
||||
#include "win32_monitor.c"
|
||||
#include "win32_time.c"
|
||||
#include "win32_joystick.c"
|
||||
#include "win32_window.c"
|
||||
Loading…
Add table
Add a link
Reference in a new issue