www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - CTFE: Less Memory, More Speed!

reply Walter Bright <newshound2 digitalmars.com> writes:
Rainer and I collaborated on switching CTFE from using the heap to using a 
region allocator, which recycles the memory en masse at CTFE exit. Rainer did 
some benchmarking:

dmd 2.088: 1039 MB in 6.6 seconds
master: 909 MB in 5.0 seconds

https://github.com/dlang/dmd/pull/10396#issuecomment-531454363

and it's looking like a sweet win!
Sep 13
next sibling parent Paolo Invernizzi <paolo.invernizzi gmail.com> writes:
On Saturday, 14 September 2019 at 06:52:25 UTC, Walter Bright 
wrote:
 Rainer and I collaborated on switching CTFE from using the heap 
 to using a region allocator, which recycles the memory en masse 
 at CTFE exit. Rainer did some benchmarking:

 dmd 2.088: 1039 MB in 6.6 seconds
 master: 909 MB in 5.0 seconds

 https://github.com/dlang/dmd/pull/10396#issuecomment-531454363

 and it's looking like a sweet win!
I really really appreciate that kind of work on the compiler! Kudos to both for the improvement! Keep pushing on that way! /Paolo
Sep 14
prev sibling parent reply SashaGreat <s g.com> writes:
On Saturday, 14 September 2019 at 06:52:25 UTC, Walter Bright 
wrote:
 ... Rainer did some benchmarking:

 dmd 2.088: 1039 MB in 6.6 seconds
 master: 909 MB in 5.0 seconds
For a Win32 release
 and it's looking like a sweet win!
Another test showed:
 ... in a Linux x64 VM; using dmd 2.082.0 as host compiler (and 
 ENABLE_RELEASE), best of 3 runs:
e9840d3: 1,600 MB in 0:23.62, -lowmem: 419 MB in 0:43.57
master (bc93e5e): 1,462 MB in 0:22.02, -lowmem: 419 MB in 0:42.56
I think it needs much more improvement. S.
Sep 14
parent Walter Bright <newshound2 digitalmars.com> writes:
On 9/14/2019 7:05 AM, SashaGreat wrote:
 ... in a Linux x64 VM; using dmd 2.082.0 as host compiler (and 
 ENABLE_RELEASE), best of 3 runs:
 e9840d3: 1,600 MB in 0:23.62, -lowmem: 419 MB in 0:43.57
 master (bc93e5e): 1,462 MB in 0:22.02, -lowmem: 419 MB in 0:42.56
I think it needs much more improvement.
It's not enabled with -lowmem, as that lets the GC deal with it.
Sep 14