rig the benchmark a bit ;-)

This commit is contained in:
Havoc Pennington 2002-10-06 19:50:31 +00:00
parent fc4a0aef0d
commit 81b6316081

View File

@ -373,8 +373,11 @@ run_speed_comparison (Display *xdisplay,
struct timeval start, end; struct timeval start, end;
int n_left; int n_left;
/* We just use atom values 0 to n_props, many are probably BadAtom, /* We just use atom values (0 to n_props) % 200, many are probably
* that's fine. * BadAtom, that's fine, but the %200 keeps most of them valid. The
* async case is about twice as advantageous when using valid atoms
* (or the issue may be that it's more advantageous when the
* properties are present and data is transmitted).
*/ */
n_props = 4000; n_props = 4000;
printf ("Timing with %d property requests\n", n_props); printf ("Timing with %d property requests\n", n_props);
@ -385,7 +388,7 @@ run_speed_comparison (Display *xdisplay,
while (i < n_props) while (i < n_props)
{ {
if (ag_task_create (xdisplay, if (ag_task_create (xdisplay,
window, (Atom) i, window, (Atom) i % 200,
0, 0xffffffff, 0, 0xffffffff,
False, False,
AnyPropertyType) == NULL) AnyPropertyType) == NULL)
@ -467,7 +470,7 @@ run_speed_comparison (Display *xdisplay,
data = NULL; data = NULL;
if (XGetWindowProperty (xdisplay, window, if (XGetWindowProperty (xdisplay, window,
(Atom) i, (Atom) i % 200,
0, 0xffffffff, 0, 0xffffffff,
False, False,
AnyPropertyType, AnyPropertyType,