Karim Belabas on Thu, 20 Nov 1997 18:48:10 +0100

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: From the 2.0.alpha Tutorial (1)

> > [I wrote]
> >
> > This metacommand's behaviour is weirder than that: it does not kill
> > variables... A brief history:
> [...]
> >   As there will soon be commands to save and restore an entire session, this
> > will become pointless as well. It's of course trivial to add a parameter to
> > it. What do you people think would be useful (I mean, something that you
> > would actually use...) ?
> [Gerhard answered]
> What do I use it for?  I was under the impression that it cleared the
> history array, and thus reduced the virtual memory footprint.  Does it now?

Oh, it does. But it's much easier to do it by modifying the "histsize"
default without tampering with anything else. Something like

default(histsize,1)   \\ clear all
default(histsize,500) \\ I still want an history after all...

Hum, this just prompted the discovery two unrelated bugs.
1) histsize can't be 0 (I wonder why I forbid it, now that I think of it)
2) when histsize is 1 and an error occur, the last result is bizarrely

> (So my main interest was actually in the precise opposite of saving
> and restoring the entire session;  it was in _forgetting_ as much as
> possible without the overhead of exiting and restarting the executable!)
> (And it _did_ have a strong effect in certain situations with 1.39;
> due to increasing non-locality when the top of the stack and the bottom
> of the history no longer fit into the L2 cache together.  Some stuff
> like zetak slowed down by a factor of 3...4 when the history got long,
> and was back to normal after a \k.  This is on Pentium hardware, it
> may manifest itself differently or not at all on Suns etc.)

Cheers, Karim.
Karim Belabas                          e-mail:
Max-Planck-Institut fuer Mathematik       karim@mpim-bonn.mpg.de
Gottfried-Claren-Str. 26               tel:
53225 Bonn (Germany)                      (00 49 228) 402-245