calc_hash(const char *key, int *lenp) {
    int		len = 0;
    int		klen = *lenp;
    uint64_t	h = 0;
    bool	special = false;

    if (NULL != key) {
	const uint8_t	*k = (const uint8_t*)key;

	for (; len < klen; k++) {
	    // narrow to most used range of 0x4D (77) in size
	    if (*k < 0x2D || 0x7A < *k) {
		special = true;
	    }
	    // fast, just spread it out
	    h = 77 * h + ((*k | 0x20) - 0x2D);
	    len++;
	}
    }
    if (special) {
	*lenp = -len;
    } else {
	*lenp = len;
    }
    return h;
}
calc_hash(const char *key, int *lenp) {
    int		len = 0;
    int		klen = *lenp;
    uint64_t	h = 0;
    bool	special = false;

    if (NULL != key) {
	const uint8_t	*k = (const uint8_t*)key;

	for (; len < klen; k++) {
	     
	    if (*k < 0x2D || 0x7A < *k) {
		special = true;
	    }
	     
	    h = 77 * h + ((*k | 0x20) - 0x2D);
	    len++;
	}
    }
    if (special) {
	*lenp = -len;
    } else {
	*lenp = len;
    }
    return h;
}