Re: [Gnome-print] Problem with gnome-print-multipage
- From: Jody Goldberg <jgoldberg home com>
- To: Lauris Kaplinski <lauris ximian com>
- Cc: Benke L?szl? a tan?r <decike freemail hu>, gnome-print ximian com
- Subject: Re: [Gnome-print] Problem with gnome-print-multipage
- Date: Thu, 4 Oct 2001 13:37:13 -0400
On Thu, Oct 04, 2001 at 06:29:11PM +0200, Lauris Kaplinski wrote:
> > for (;affines;affines=affines->next)
> > {
> > affine = g_new(gdouble, 6);
> > memcpy(affine, affines->data, sizeof(gdouble) * 6);
> > list = g_list_append(list,affine);
> > }
How big is the affine list expected to be ? g_list_append is an
O(n) operation. I prefer to use g_list_prepend (O(1)) with a
single g_list_reverse afterwards (O(n)). The loss of clarity is
defensible if the list is non trivial.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]