Re: [PATCH] Correct dir.c to compile on Solaris 9

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Johannes Schindelin <Johannes.Schindelin@...>
Cc: Shawn O. Pearce <spearce@...>, Junio C Hamano <junkio@...>, <git@...>
Date: Sunday, April 15, 2007 - 5:03 pm

On Sunday 15 April 2007, Johannes Schindelin wrote:

Or faster. When the table gives a cache miss and has to be
loaded from main memory, I am quite sure that 5 compares in a row are
faster than the cache miss.

Actually, with the switch, the compiler is free to implement it with a
table (and gcc usually does this, probably even using a substantially
smaller table). The table-based check in contrast looks
like some kind of micro-optimization which makes the code IMHO more
difficult to read, and which only would be justified with meassured
improvements.

Josef
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Correct dir.c to compile on Solaris 9, Shawn O. Pearce, (Sun Apr 15, 12:33 am)
Re: [PATCH] Correct dir.c to compile on Solaris 9, Johannes Schindelin, (Sun Apr 15, 12:25 pm)
Re: [PATCH] Correct dir.c to compile on Solaris 9, Josef Weidendorfer, (Sun Apr 15, 5:03 pm)
Re: [PATCH] Correct dir.c to compile on Solaris 9, Robin Rosenberg, (Sun Apr 15, 5:54 pm)
Re: [PATCH] Correct dir.c to compile on Solaris 9, Junio C Hamano, (Sun Apr 15, 6:48 pm)