Staging
v0.5.2
https://github.com/git/git
Revision 39556fbdadaacf67330bc1464e0172468e9c3a5e authored by Nicolas Pitre on 10 February 2006, 18:42:05 UTC, committed by Junio C Hamano on 10 February 2006, 19:42:56 UTC
My kernel work habit made me look at the generated assembly for the
delta code, and one obvious albeit small improvement is this patch.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent e7ad4a9
Raw File
Tip revision: 39556fbdadaacf67330bc1464e0172468e9c3a5e authored by Nicolas Pitre on 10 February 2006, 18:42:05 UTC
delta micro optimization
Tip revision: 39556fb
ctype.c
/*
 * Sane locale-independent, ASCII ctype.
 *
 * No surprises, and works with signed and unsigned chars.
 */
#include "cache.h"

#define SS GIT_SPACE
#define AA GIT_ALPHA
#define DD GIT_DIGIT

unsigned char sane_ctype[256] = {
	 0,  0,  0,  0,  0,  0,  0,  0,  0, SS, SS,  0,  0, SS,  0,  0,		/* 0-15 */
	 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,		/* 16-15 */
	SS,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,		/* 32-15 */
	DD, DD, DD, DD, DD, DD, DD, DD, DD, DD,  0,  0,  0,  0,  0,  0,		/* 48-15 */
	 0, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA,		/* 64-15 */
	AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA,  0,  0,  0,  0,  0,		/* 80-15 */
	 0, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA,		/* 96-15 */
	AA, AA, AA, AA, AA, AA, AA, AA, AA, AA, AA,  0,  0,  0,  0,  0,		/* 112-15 */
	/* Nothing in the 128.. range */
};

back to top