Hi Mark, Just a few questions.
Mark H Weaver <m...@netris.org> skribis: > Here's an implementation of the efficient gensym hack for stable-2.0. > It makes 'gensym' about 4.7 times faster on my Yeeloong. Gensyms are > not given names or even numbers until they are asked for their names or > hash values (for 'equal?' hash tables only). Ooooh, I only really understood when seeing this: + return scm_double_cell (scm_tc7_symbol | SCM_I_F_SYMBOL_LAZY_GENSYM, + SCM_UNPACK (prefix_stringbuf), (scm_t_bits) 0, + SCM_UNPACK (scm_cons (SCM_BOOL_F, SCM_EOL))); So you can actually ‘eq?’ or ‘hashq’ them regardless of whether they have a name, nice! :-) > The first patch adds an optimization for strings that is important for > gensyms. It avoids locking a mutex when setting the shared flag on a > stringbuf if the shared flag is already set. How much impact does this have? Thanks to futexes, mutex_lock should be fairly cheap when there’s no contention, no? Nice work! Thanks, Ludo’.