Loader Optimization Benchmarks

Robert Shearman rob at codeweavers.com
Tue Jan 10 07:24:07 CST 2006


I thought it would be good to post some benchmarks for the patch I just 
sent to wine-patches:

I tested the loader code using the following in both cases:
    int i;
    DWORD dwTicksAfter;
    DWORD dwTicksBefore = GetTickCount();
    for (i = 0; i < 1000; i++)
    dwTicksAfter = GetTickCount();
    trace("time taken = %ld ms\n", dwTicksAfter - dwTicksBefore);

Before the patch:
time taken = 658 ms
time taken = 661 ms
time taken = 661 ms
time taken = 658 ms
time taken = 659 ms

After the patch was applied:
time taken = 12 ms
time taken = 12 ms
time taken = 12 ms
time taken = 13 ms
time taken = 12 ms

So it should be obvious that there are some very real gains from using 
this patch in the test case.

You might think that an application loading a DLL 1000 times is very 
unlikely, but bear in mind that the ole32 marshal tests load ole32 76 
times. It is therefore conceivable that something more complex like 
InstallShield could load ole32 over 100 times.

Rob Shearman

More information about the wine-devel mailing list