[svn:parrot] r41441 - trunk/src/gc

chromatic at svn.parrot.org chromatic at svn.parrot.org
Thu Sep 24 07:26:16 UTC 2009


Author: chromatic
Date: Thu Sep 24 07:26:13 2009
New Revision: 41441
URL: https://trac.parrot.org/parrot/changeset/41441

Log:
[GC] Increased initial sizes of GC pools to:

 * fit on platform page size boundaries
 * accommodate initial STRING/PMC counts for starting Parrot

Note that the code still has too many magic numbers and assumptions, will
require editing when PMC/STRING sizes change, may require tuning when the
number of PMCs/STRINGs created change, and assumes 4k pages and 32-bit
machines.  Better constant declarations which respect platform-specific probes
welcome.  Even so, this improves Rakudo's startup time by 2.046% and likely
improves further performance, due to larger (even though they grow) arenas.

Modified:
   trunk/src/gc/gc_private.h

Modified: trunk/src/gc/gc_private.h
==============================================================================
--- trunk/src/gc/gc_private.h	Thu Sep 24 01:25:28 2009	(r41440)
+++ trunk/src/gc/gc_private.h	Thu Sep 24 07:26:13 2009	(r41441)
@@ -47,16 +47,16 @@
 #define POOL_MAX_BYTES                         65536 * 128
 
 #ifndef GC_IS_MALLOC
-#  define PMC_HEADERS_PER_ALLOC    10240 / sizeof (PMC)
-#  define BUFFER_HEADERS_PER_ALLOC  5120 / sizeof (Buffer)
-#  define STRING_HEADERS_PER_ALLOC  5120 / sizeof (STRING)
+#  define PMC_HEADERS_PER_ALLOC     4096 * 10 / sizeof (PMC)
+#  define BUFFER_HEADERS_PER_ALLOC  4096      / sizeof (Buffer)
+#  define STRING_HEADERS_PER_ALLOC  4096 * 20 / sizeof (STRING)
 #else /* GC_IS_MALLOC */
 #  define PMC_HEADERS_PER_ALLOC    10240 / sizeof (PMC)
 #  define BUFFER_HEADERS_PER_ALLOC 10240 / sizeof (Buffer)
 #  define STRING_HEADERS_PER_ALLOC 10240 / sizeof (STRING)
 #endif /* GC_IS_MALLOC */
 
-#define CONSTANT_PMC_HEADERS_PER_ALLOC 64
+#define CONSTANT_PMC_HEADERS_PER_ALLOC 4096 / sizeof (PMC)
 #define GET_SIZED_POOL_IDX(x) ((x) / sizeof (void *))
 
 


More information about the parrot-commits mailing list