Completing C code with D style

forkit forkit at gmail.com
Wed Nov 10 23:39:40 UTC 2021


On Wednesday, 10 November 2021 at 23:05:06 UTC, H. S. Teoh wrote:
> On Wed, Nov 10, 2021 at 10:17:48PM +0000, russhy via 
> Digitalmars-d-learn wrote:
>> On Wednesday, 10 November 2021 at 06:47:32 UTC, forkit wrote:
>> > btw. My pc has 24GB of main memory, and my CPU 8MB L3 cache. 
>> > So I really don't give a damn about allocations .. not one 
>> > little bit ;-)
>> 
>> It's not a good mindset to have
>> 
>> Give room for the unexpected, don't burn all of your options 
>> right now
>> 
>> Having good foundation helps one to grow and scale faster than 
>> others
> [...]
>
> +1.
>
> Ironically, dmd itself is pretty care-free about allocating 
> memory (in the name of compile speed -- after all, everybody 
> has GBs of RAM to spare, but nobody wants to wait, right?). As 
> a result, I cannot compile even simple programs on a low-memory 
> system because the compiler runs out of memory and crashes 
> before it can finish compiling.  What good is a super-fast 
> compiler that cannot finish compiling before it uses too much 
> memory?  Because of this, I have not dared to introduce D to my 
> colleagues -- if they see what dmd does on the kind of 
> low-memory embedded systems that we work on, they'd get such a 
> bad impression of D they'll never ever want to hear about it 
> again. :-/
>
>
> T

I still remember compiling code on my 286x86 ... talk about low 
memory..whoaaah.

These days, I have a 4GB ramdisk, put all the dmd/phobos..etc 
source code into that, and everything is read/compiled completely 
in memory, in seconds. The slowest part is copying the 
compilation back to disk, but even that happens so fast I don't 
even see it happen.

Worrying about an extra allocation here or there seems kinds 
trivial over here ;-)



More information about the Digitalmars-d-learn mailing list