LDC: Speed up incremental builds with object file caching

Nordlöw via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Sun Sep 18 07:58:51 PDT 2016


On Saturday, 17 September 2016 at 18:46:26 UTC, Johan Engelen 
wrote:
> I just finished another post about LDC:
> https://johanengelen.github.io/ldc/2016/09/17/LDC-object-file-caching.html

Great innovative work!

One thing: I'm missing an option for only doing time-stamp 
checking of the dependencies similar to how SCons checks if 
cached files are obselete.

See the Decider function documented here:

http://www.scons.org/doc/HTML/scons-user/ch06.html#idp1416061700

It can be either

- Decider('MD5')
- Decider('timestamp-newer')
- Decider('timestamp-match')
- Decider('MD5-timestamp')

As I see it the LDC-enhancement always does content hashing, that 
is, it is similar to SCons' `Decider('MD5')`. If so, it would be 
very worthwhile checking how much faster an approach similar to 
`Decider('MD5-timestamp')` would be. This approach only hashes 
content of dependencies if they have been modified since last 
hashing during last build of that object with the same compiler 
flags was done.


More information about the Digitalmars-d-announce mailing list