Re: [PULL svn-fe] vcs-svn: simplifications, error handling improvements

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Junio C Hamano wrote:

> Jonathan Nieder <jrnieder@xxxxxxxxx> writes:
> 
>> Please pull
>> 
>>  git://repo.or.cz/git/jrn.git svn-fe
>> 
>> to get the following changes on top of master.
> 
> Done.
> 
> I only gave a cursory look at "git diff ORIG_HEAD" output immediately
> after pulling, but I found that the majority of lines deleted were of
> questionable style and the added ones looked more like normal C ;-)
> 
> Except for
> 
> 	switch (keylen + 1) {
>        case sizeof("constant string"):
>        	...
>                break;
>        case sizeof("another constant string"):
>        	...
> 	}
> 
> which looked a bit unusual. But mistakes in this construct can be easily
> caught by the compiler that would notice duplicated case labels, so it
> probably is not so brittle as it first looks.

Agreed, it is quite an odd construct but it took quite a bit of refinement to
arrive there. It is a compromise between moderately readable and
reasonably fast. I did play around with perfect hash generators prior to
settling on this approach. Ditto re compile time checking.

Jonathan, I suppose I should set up a performance test for these patches
because my first thought was "I wonder what these buy us on their own?"

--
David Barr.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]