Re: [Gnome-print] Problem with gnome-print-multipage



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]