Re: optimizing NOP emissions (Re: [Nautilus-list] nautilus & signals)
- From: Anders Carlsson <andersca gnu org>
- To: Tim Janik <timj gtk org>
- Cc: Michael Meeks <michael ximian com>, Gtk+ Developers <gtk-devel-list gnome org>, Alex Larsson <alexl redhat com>, Darin Adler <darin bentspoon com>, nautilus <nautilus-list eazel com>
- Subject: Re: optimizing NOP emissions (Re: [Nautilus-list] nautilus & signals)
- Date: 12 Apr 2002 10:15:56 +0200
On Fri, 2002-04-12 at 00:45, Tim Janik wrote:
[snip]
> for (1), i have appended a patch that people can check out (should better be
> thoroughly tested) and profile (i don't have time to do thorough profiling
> of gtk+-2.0 based third party apps at this point, and we need good profiling
> data to judge over (2)).
>
Hello,
so I tried the test program that Alex wrote, with and without the patch:
Without the patch:
Testing signal emissions with no installed handlers
===================================================
100000 nop emits by name in 495 milliseconds
100000 integer emits by name in 561 milliseconds
100000 string emits by name in 814 milliseconds
100000 nop emits by id in 325 milliseconds
100000 integer emits by id in 404 milliseconds
100000 string emits by id in 606 milliseconds
And with the patch:
Testing signal emissions with no installed handlers
===================================================
100000 nop emits by name in 159 milliseconds
100000 integer emits by name in 153 milliseconds
100000 string emits by name in 161 milliseconds
100000 nop emits by id in 46 milliseconds
100000 integer emits by id in 46 milliseconds
100000 string emits by id in 45 milliseconds
So signal emissions with no handlers are significantly faster. Signal
emissions with handlers are a little slower:
Before the patch:
Testing signal emissions with ten null handlers
===============================================
100000 nop emits by name in 1213 milliseconds
100000 integer emits by name in 1514 milliseconds
100000 string emits by name in 1848 milliseconds
100000 nop emits by id in 1038 milliseconds
100000 integer emits by id in 1332 milliseconds
100000 string emits by id in 1623 milliseconds
After the patch:
Testing signal emissions with ten null handlers
===============================================
100000 nop emits by name in 1293 milliseconds
100000 integer emits by name in 1612 milliseconds
100000 string emits by name in 1946 milliseconds
100000 nop emits by id in 1107 milliseconds
100000 integer emits by id in 1400 milliseconds
100000 string emits by id in 1702 milliseconds
Anders
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]