[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1382204 - /subversion/trunk/subversion/libsvn_subr/utf_validate.c

From: Branko Čibej <brane_at_wandisco.com>
Date: Sat, 08 Sep 2012 07:47:43 +0200

On 08.09.2012 03:59, Peter Samuelson wrote:
>> for (; len > 0; ++data, --len)
>> - if (*data < 0)
>> - return data;
>> + if (*data < 0 || *data >= 0x80)
>> + return data;
> A reasonable compiler will collapse it anyway, but this is shorter and
> more direct:
>
> if (*data & 0x80)

Also less obvious to the casual reader. Let's just leave it to
reasonable compilers to optimize the code for us. I can live with
unreasonable compilers causing the CPU to do more grunt work. :)

-- Brane

-- 
Certified & Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download
Received on 2012-09-08 07:48:27 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.