GC_enable_incremental()
=======================

As you can see from the text that is attached below, Steven Buytaert, suggested
that Sather code could be sped up by switching on incremental garbage collection
in the GC. I did some testing on my own and came to the opposite result:
On a AMD-K6, 333 MHz, 128 MB RAM, the compilation of the Sather compiler
(only_C, of course) took ~1 Minute without incremental GC and 1:15 Min. after I
enabled it. This is certainly because memory is not a problem on my machine (no
swapping at all) Anyway, real-life applications (esp. interactive ones)
incremental collection may  be a great plus.

If you want to make use of it, simply change the #undef GC_ENABLE_INCREMENTAL to
#define in the header.h for the appropriate Platform's directory.

A hint for experimenters: to switch it on and of, it is enough to make this
change, recompile the runtime.o in the .code directory and relink. Only that file
is affected by the difference.

If you get any interesting results, I'd be interested. Have fun.

Norbert "Nobbi" Nemec <nobbi@gnu.org>

--------------------------------------------------------------------------------

During my experiments with Sather-1.0.8p0 (that I downloaded from ftp.icsi
without permission, I hope you forgive me...) on both my Linux machine I
found out the following:

  Machine = Linux 1.3.13
	     486DX2
	     31 Bogomips
	     32 Meg phys
	     80 Meg swap
  cs 1.0.8p0 compiled with
	     -fast
	     -no_check

  As benchmark I used to compile the Sather compiler itself without
  optimalisation and without compiling the generated C code (only_C).
  (I erased the code directories after each test, of course...)
  I got the following interesting timing results (seconds);

	Pass     | cs with incremental GC | cs without incremental GC
    -------------+------------------------+----------------------------
      Parse      |              26        |               23
      Find...    |              31        |               25
      graph...   |               0        |                0
      Check...   |             238        |              393
      Headers... |             367        |              579
    -------------+------------------------+----------------------------
      Time       |      11 minutes        |       17 minutes
      Max Swap   |      37 Meg Swap       |       44 Meg Swap

  So the incremental version gave me both a speed and memory
  consumption advantage.  When issuing 'make test' in the GC directory
  and the test starts with 'switching to incremental collection' (or
  something alike), the GC can be used incrementaly. One then just has
  to add the call:

    GC_enable_incremental();

  just before the first allocation, in the file system.c. For cs, just
  before 'main_ob = ...'.

    -- 
    Steven Buytaert
    home : buytaert@clever.be
    work : buytaert@imec.be
