Speeding up DCD in big projects

H. S. Teoh hsteoh at quickfur.ath.cx
Tue Jul 21 17:02:16 UTC 2020


On Tue, Jul 21, 2020 at 04:46:23PM +0000, Bruce Carneal via Digitalmars-d wrote:
> On Tuesday, 21 July 2020 at 12:53:10 UTC, WebFreak001 wrote:
> > Essential to this were `nothrow` overloads of isFile/isDir in
> > std.file, which I now manually implemented. Having functions for
> > those in phobos would be awesome and clearly would offer huge
> > performance improvements.
> 
> Was the change to nothrow the only alteration?  I ask because I
> thought that a move to nothrow only wins big if it enables inlining
> within a hot loop.
> 
> Perhaps your manual implementation wins in other ways?
[...]

I'm skeptical of "huge performance improvements" with nothrow in
anything that involves disk I/O.  An I/O roundtrip far outweighs
whatever meager savings you may have won with nothrow.  I have a hard
time conceiving of a situation where nothrow would confer significant
performance improvements to isFile/isDir.  IMO you'd get much better
savings by reducing the number of I/O roundtrips instead.


T

-- 
Today's society is one of specialization: as you grow, you learn more and more about less and less. Eventually, you know everything about nothing.


More information about the Digitalmars-d mailing list