Improving Nasal: Difference between revisions

Jump to navigation Jump to search
m
Line 130: Line 130:
= Performance / Optimizations =
= Performance / Optimizations =
* Hooray: look into adapting the existing GC scheme to support multiple generations - which is a straightforward optimizations even without being a GC expert, it basically boils down to having a single typedef enum {GC_GEN0, GC_GEN1} GENERATION; in code.h and then changing all places in $SG_NASAL to use the GC_GEN0 pool by default, i.e. instead of having &globals->pools[type]; - we would have &globals->pools[GC_GEN0][type]; for starters - the GC manager would then by default only mark/reap the GEN0 (nursery, young generation), promote any objects that survived the GC phase to GEN1, and only ever mark/reap GEN1 if GEN0 has to be resized. {{Not done}}
* Hooray: look into adapting the existing GC scheme to support multiple generations - which is a straightforward optimizations even without being a GC expert, it basically boils down to having a single typedef enum {GC_GEN0, GC_GEN1} GENERATION; in code.h and then changing all places in $SG_NASAL to use the GC_GEN0 pool by default, i.e. instead of having &globals->pools[type]; - we would have &globals->pools[GC_GEN0][type]; for starters - the GC manager would then by default only mark/reap the GEN0 (nursery, young generation), promote any objects that survived the GC phase to GEN1, and only ever mark/reap GEN1 if GEN0 has to be resized. {{Not done}}
** http://en.wikipedia.org/wiki/Garbage_collection_(computer_science)#Generational_GC_.28ephemeral_GC.29
** http://c2.com/cgi/wiki?GenerationalGarbageCollection
** http://blogs.msdn.com/b/abhinaba/archive/2009/03/02/back-to-basics-generational-garbage-collection.aspx
* marking/reaping could be parallelized using several threads, for each pool - by using write barriers to sync access to naRefs
* marking/reaping could be parallelized using several threads, for each pool - by using write barriers to sync access to naRefs


Navigation menu