Articles:  VMWare review Useful software |
Krzysztof Kowalczyk's Weblog Blog or you'll be blogged. Tuesday, August 06, 2002
Performance, profiles. Some info about performance (in the context of programming languages) on this page. Main take away is that there are 3 ways to get good performance: profile, profile, profile. Sadly, I don't know any good profilers (notice "good").
Imagine you want to launch a web browser from within your program and make it go to a specific site. You can do it the easy way:
void LaunchIE(char *site) { ShellExecute( GetDesktopWindow(), "", "iexplore", site, NULL, SW_SHOWNORMAL ); }There's one problem with this code: it doesn't run on Windows 95 and 98 and those are still very popular. Fortunately, there is another way to do almost the same: HANDLE JustCreateProcess(char *cmd, char *dir) { PROCESS_INFORMATION ProcInfo={0,}; STARTUPINFO StartUp={0,}; StartUp.cb=sizeof(StartUp); if (!CreateProcess(NULL, cmd, NULL, NULL, FALSE, 0, NULL, dir, &StartUp, &ProcInfo)) return NULL; if (NULL != ProcInfo.hThread) CloseHandle( ProcInfo.hThread ); return ProcInfo.hProcess; }
|
|