Re: Translated w/ 2.4 CRASH

new topic     » goto parent     » topic index » view thread      » older message » newer message

On 27 Jun 2003 at 18:37, Robert Craig wrote:

> 
> 
> kbochert at copper.net wrote:
> > Do you have the source? You might try
> > increasing the extra bytes allocated for  sequences.
> > When I saw the same slowdown  on Bach, I discovered that adding 
> > 32 bytes to the allocation solved the problem.
> > I have no idea why!
> > It may just move the slowdown to a higher threshold.
> > I have had no problems, but I don't generally do large
> > allocations.
> > I think I can post the fix in the form of:
> >    file:function -- change x to y.
> > But I will first give Rob a chance to object or comment.
> 
> That's ok with me. Post your fix.
> I assume you mean the parameters that control
> how much extra space is reserved when a sequence
> is appended-to. Increasing that value could speed up certain
> code by quite a bit, while wasting some memory
> in other situations.
> 
Always the tradeoffs. Thats one reason why I would like 
to have others try it.

Its very simple:
in alloc.c::NewS1()
change:
    EMalloc(sizeof(struct s1) + (size+1) * sizeof(object));
To:
   EMalloc(sizeof(struct s1) + (size+9) * sizeof(object));

The extra allocation (36 bytes vs 4) seems to have a sharp
threshold -- increasing to 28 bytes say, seemed to have little effect,
but that could easily be because of the specific test program.

(I could almost imagine a 'with bigmem' option  for those who
must have the speed at the expense of space)

Karl Bochert

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu