D compilation is too slow and I am forking the compiler

welkam wwwelkam at gmail.com
Fri Nov 23 20:39:15 UTC 2018


On Friday, 23 November 2018 at 19:21:03 UTC, Walter Bright wrote:
> On 11/23/2018 5:23 AM, welkam wrote:
>> Currently D reads the all files that are passed in command 
>> line before starting lexing/parsing, but in principle we could 
>> start lexing/parsing after first file is read. In fact we 
>> could start after first file`s first line is read.
>
> DMD used to do that. But it was removed because:
>
> 1. nobody understood the logic
>
> 2. it didn't seem to make a difference
>
> You can still see the vestiges by the:
>
>     static if (ASYNCREAD)
>
> blocks in the code.

I didnt expect huge wins. This would be useful when you start 
your computer and files have to be read from old spinning rust 
and the project has many files. Otherwise files will be cached 
and memcopy is fast. I was surprised on how fast modern computers 
copy data from one place to another.

Speaking of memcpy here is a video you might like. It has memcpy, 
assembler and a bit of compiler. Its very easy watch for when you 
want to relax.
Level1 Diagnostic: Fixing our Memcpy Troubles (for Looking Glass)
https://www.youtube.com/watch?v=idauoNVwWYE


More information about the Digitalmars-d-announce mailing list