dmake
dmake copied to clipboard
Vc cc improvements
fix a syntax error with VC 6, make a "release" optimized VC 6 option, VC 2005 and newer warnings fixes, a slight perf improvement on VC 2005 and newer as compared to the previous situation, but VC 2003 and earlier builds will always be faster than a VC 2005 or newer build of dmake. The vast majority of stdio is not available in _nolock versions thanks to MS so only fputc got optimized to a nolock version, its still something.
added more comits, here is a before (at commit "eliminate chdir from CacheStat on Win32") and
after (at commit "DmStrSpn: use strspn instead of self rolling outselves"). Most notable, 3537077-3343092=193985 calls to strchr were removed because of the DmStrSpn change, but in the after DmStrSpn and strspn only executed, 186193 times, which means 193985-186193=7792 times the original self rolled rolled version called strchr more than once, and did more than 1 pass through the string. There is some time savings in DmStrPbrk, which went from 0.48 us to 0.46 us in "average with children", this is because of the strlen removal, although I have no data from the profiler on how often that old strlen branch executed in DmStrPbrk (strlen is an "intrinsic" and is inlined and is not profilable). DmStrSpn actually stayed the same time wise at 0.42 us. Note this profiler stops inlining of most of dmake's code. In a non-instrumented -O2 dmake DmStrPbrk and DmStrSpn are always inlined, since those null checks on its args are often optimized away by VC.