[Top][All Lists]

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

[Help-smalltalk] faster startup 6/n

From: Paolo Bonzini
Subject: [Help-smalltalk] faster startup 6/n
Date: Mon, 18 Dec 2006 18:44:32 +0100
User-agent: Thunderbird (Macintosh/20061025)

A little to gain here from not redoing work done in oop.c.

A prototype of copy-on-write gets me down to 62 ms (but it crashes on anything but hello world...).

There is something to gain from doing less on #returnFromSnapshot too, since with copy-on-write we spend 66% of the time there. I'll see what I can get from that part, and then decide whether to fix copy-on-write. (COW has other benefits since it means that we share the memory for all gst's currently running off the same image).

--- orig/libgst/save.c
+++ mod/libgst/save.c
@@ -530,21 +530,12 @@ load_oop_table (int imageFd)
   OOP oop;
   int i;
-  /* load in the valid OOP slots from previous dump */
+  /* Load in the valid OOP slots from previous dump.  The others are already
+     initialized to F_FREE.  */
   buffer_read (imageFd, _gst_mem.ot, sizeof (struct oop_s) * num_used_oops);
   if UNCOMMON (wrong_endianness)
     fixup_byte_order (_gst_mem.ot,
                      sizeof (struct oop_s) * num_used_oops / sizeof (PTR));
-  /* mark the remaining ones as available */
-  PREFETCH_START (&_gst_mem.ot[num_used_oops], PREF_WRITE | PREF_NTA);
-  for (oop = &_gst_mem.ot[num_used_oops],
-       i = _gst_mem.ot_size - num_used_oops; i--; oop++)
-    {
-      oop->flags = F_FREE;
-    }

reply via email to

[Prev in Thread] Current Thread [Next in Thread]