Branch: Tag:

2000-12-01

2000-12-01 20:19:25 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Inlined hashmem() in hash_node() by using DO_HASHMEM().
Decreased blocking factor for struct node_s to 128.

Rev: src/las.c:1.227

5:   \*/   /**/   #include "global.h" - RCSID("$Id: las.c,v 1.226 2000/12/01 08:09:49 hubbe Exp $"); + RCSID("$Id: las.c,v 1.227 2000/12/01 20:19:25 grubba Exp $");      #include "language.h"   #include "interpret.h"
348:   }       - #define NODES 256 + #define NODES 128 /* 256 */      #undef BLOCK_ALLOC_NEXT   #define BLOCK_ALLOC_NEXT u.node.a
364: Inside #if defined(SHARED_NODES)
     static size_t hash_node(node *n)   { -  return hashmem((unsigned char *)&(n->token), +  DO_HASHMEM((unsigned char *)&(n->token),    sizeof(node) - OFFSETOF(node_s, token), sizeof(node));   }   
556:    /* else */   #endif    { -  /* Free the node and be happy */ +    #ifdef SHARED_NODES -  /* Force the hashtable to be cleared. */ +  /* Force the hashtable entry to be cleared. */    tmp->next = NULL;    sub_node(tmp);   #endif /* SHARED_NODES */ -  +  /* Free the node and be happy */    /* Make sure we don't free any nodes twice */    if(car_is_node(tmp)) _CAR(tmp)=0;    if(cdr_is_node(tmp)) _CDR(tmp)=0;