Greetings!
I have 3 compilation passes in my game/engine: The platform layer, the game's DLL and a code generator/metaprogram.
On an i5 3570K and a 3 years old SSD both the game and code generator compile within a second!
However; the platform layer seems to take a lot longer time. Almost 3 times slower (combined with the game dll and code generator they would all take about 3 seconds)
I know 3 seconds isn't really much. I mean hey CPP and templates people wouldn't even dream of hitting this speed but still, I like to milk the performance out of things if I could.
The question is, why is the platform layer taking longer? I guess it's because we're linking against user32.lib and gdi32.lib? What happens if we load the code we need out of those dynamically? is it because of those .libs or are there other reasons? maybe something in my compiler flags?
Here's my build script:
[Code]
@echo off
pushd W:\Projects\Breakout\build
set SrcDir="..\\src\\"
set CommonCompilerFlags=-MTd -nologo -fp:fast -Gm- -GR- -EHa- -Z7 -W3 -wd4996 -wd4201 -wd4100 -wd4189 -wd4505
set CommonLinkerFlags=-incremental:no -opt:ref
REM Engine exe
cl %CommonCompilerFlags% ..\src\Win32Platform.cpp -FmWin32Platform.map /link %CommonLinkerFlags% user32.lib gdi32.lib
REM Game DLL
call %SrcDir%build_game.bat
REM Generator exe
cl %CommonCompilerFlags% ..\src\CodeGenerator.cpp
popd
[/Code]
Appreciate any advice.
Thanks!
elxenoanizd/vexe