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).
Paolo
--- 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++)
- {
- PREFETCH_LOOP (oop, PREF_WRITE | PREF_NTA);
- oop->flags = F_FREE;
- }
}
_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk