Re: [tablix-list] Scope for small (5%) speed improvement in Tablix

From: John Winters <johnREMOVE@THISsinodun.org.uk>
Date: Wed Jul 28 2004 - 13:39:15 CEST

On Wed, 2004-07-28 at 09:27, Ida Adyani Hamzah wrote:
> Hi...
>
> I'm experimenting on tablix. Unfortunately, for my complex data, it tooks about a few days to complete ( even with pvm ). The "small" 5% of speed improvement will surely be a big issue to me. I've changed the
>
> tuple **tuplemap to tuple tuplemap [TUPLEMAX]

The above change means that the data space is now statically allocated
instead of dynamically allocated.

>
> and i've changed the
>
> tuplemap[tuplemut]->tid=tid; to tuplemap[tuplemut].tid=tid; as well as all the cid,sid,imut_room and imut_time.

That's fine.

>
> but whats happenning is I got this error when i make :
>
> data.c:194: error: incompatible type for argument 1 of `free'
> >> for(c=0;c<tuplenum;c++) free(tuplemap [c]);

Since the data space is now statically allocated there's no need to use
either malloc or free. Delete all lines which do:

tuplemap = malloc(...);
tuplemap [n] = malloc(...);
free(tuplemap [n]);
free(tuplemap);

You can identify them very easily simply by looking at the output
messages from the compiler.

HTH
John
Received on Wed Jul 28 13:59:23 2004

This archive was generated by hypermail 2.1.8 : Tue Aug 16 2005 - 20:42:17 CEST