NetBSD-Bugs archive

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

Re: kern/50571: src/sys/fs/udf/udf_subr.c:6465: obvious performance tidyup



The following reply was made to PR kern/50571; it has been noted by GNATS.

From: Robert Elz <kre%munnari.OZ.AU@localhost>
To: christos%zoulas.com@localhost (Christos Zoulas)
Cc: gnats-bugs%NetBSD.org@localhost, kern-bug-people%netbsd.org@localhost, gnats-admin%netbsd.org@localhost,
        netbsd-bugs%netbsd.org@localhost, dcb314%hotmail.com@localhost
Subject: Re: kern/50571: src/sys/fs/udf/udf_subr.c:6465: obvious performance tidyup
Date: Sat, 19 Dec 2015 09:53:37 +0700

     Date:        Fri, 18 Dec 2015 20:12:59 -0500
     From:        christos%zoulas.com@localhost (Christos Zoulas)
     Message-ID:  <20151219011259.AD7F117FDAB%rebar.astron.com@localhost>
 
   | helping the compiler to produce more efficient code has a better chance of
   | success today.
 
 I wouldn't guarantee that it is a performance improvement, it depends
 upon the size and alignment of pos & inflen, if inflen is relatively
 small, and pos isn't aligned (and nor is pos+inflen) then the extra
 costs of the memset machinations required are likely to outweigh the
 cost of a few more 0 writes.
 
 Aside from the question of whether it should have been done, you also
 just inserted the code supplied in the initial PR from dcb314%hotmail.com@localhost
 which leaves blob[0 ..  pos-1] uninitialised.
 
 It needs an extra memset to correct that.
 
 kre
 


Home | Main Index | Thread Index | Old Index