Re: LDC 1.25.0

2021-02-23 Thread H. S. Teoh via Digitalmars-d-announce
On Tue, Feb 23, 2021 at 07:32:13PM +, kinke via Digitalmars-d-announce 
wrote:
> On Tuesday, 23 February 2021 at 18:19:09 UTC, H. S. Teoh wrote:
> > Tested this on one of my projects yesterday. For -O3, it reduced
> > compile time by about ~26%.  For -O, it reduced compile time by
> > about 24%.  Not as much as I'd hoped, but still pretty big
> > reductions.
> 
> Thx for some numbers. [Note that -O == -O3 == -O4 == -O5, they are all
> the same (at least for now), contrary to what you might read
> somewhere.] A reduction by 25%, i.e., a 1.33x speed-up, for code that
> is guaranteed to be at least as fast as before (higher cross-module
> inlining potential) isn't too bad, aye? :)

Yeah actually it's pretty good.  It's only that my expectations were a
bit high when you reported 50+% reductions in compile times. :-)


> > For non-optimized builds, it reduced compile times by only 1-2%
> > (pretty insignificant).
> 
> I find it rather interesting that it isn't any slower. Compiling debug
> Phobos all-at-once took 67% longer on my box (and increased the static
> lib size by 76%). Without -O, I've only seen some improvements with
> `-unittest`.
[...]

Interesting indeed. I just did a quick test with -unittest, and got
these numbers:

-unittest:  15.9 sec
-unittest -linkonce-templates:  22.3 sec
-unittest -O:   54.4 sec
-unittest -O -linkonce-templates:   40.7 sec

Apparently with -unittest it *does* run slower without -O. But with -O,
it does run faster.


T

-- 
It won't be covered in the book. The source code has to be useful for 
something, after all. -- Larry Wall


Re: LDC 1.25.0

2021-02-23 Thread kinke via Digitalmars-d-announce

On Tuesday, 23 February 2021 at 18:19:09 UTC, H. S. Teoh wrote:
Tested this on one of my projects yesterday. For -O3, it 
reduced compile time by about ~26%.  For -O, it reduced compile 
time by about 24%.  Not as much as I'd hoped, but still pretty 
big reductions.


Thx for some numbers. [Note that -O == -O3 == -O4 == -O5, they 
are all the same (at least for now), contrary to what you might 
read somewhere.]
A reduction by 25%, i.e., a 1.33x speed-up, for code that is 
guaranteed to be at least as fast as before (higher cross-module 
inlining potential) isn't too bad, aye? :)


For non-optimized builds, it reduced compile times by only 1-2% 
(pretty insignificant).


I find it rather interesting that it isn't any slower. Compiling 
debug Phobos all-at-once took 67% longer on my box (and increased 
the static lib size by 76%). Without -O, I've only seen some 
improvements with `-unittest`.


Some more numbers on my box:

https://github.com/ldc-developers/ldc/pull/3600#issuecomment-729116599
https://github.com/ldc-developers/ldc/pull/3422#issuecomment-661386233


Re: LDC 1.25.0

2021-02-23 Thread H. S. Teoh via Digitalmars-d-announce
On Sun, Feb 21, 2021 at 06:26:38PM +, kinke via Digitalmars-d-announce 
wrote:
> Glad to announce LDC 1.25 - some highlights:
> 
> - Based on D 2.095.1.

Awesome!!  Thanks to everyone in the LDC team who made this release
possible.


[...]
> - New experimental template emission scheme for -linkonce-templates.
> This option can significantly accelerate compilation times for
> optimized builds (e.g., 56% faster on my box when compiling the
> optimized Phobos unittests).
[...]

Tested this on one of my projects yesterday. For -O3, it reduced compile
time by about ~26%.  For -O, it reduced compile time by about 24%.  Not
as much as I'd hoped, but still pretty big reductions.

For non-optimized builds, it reduced compile times by only 1-2% (pretty
insignificant).


T

-- 
The easy way is the wrong way, and the hard way is the stupid way. Pick one.


Talk before Compiler Research Group at IRIS-HEP Princeton on SIL-cling

2021-02-23 Thread Laeeth Isharc via Digitalmars-d-announce

https://youtu.be/7teqrCNzrD8

https://t.co/2iAWdO9cXA

Alexandru Militaru speaks to Compiler Research Group, IRIS-HEP at 
Princeton about his work at @SymmetryInvest  using CERN's cling 
to compile and call C++ from our internal domain specific 
language, SIL.


#dlang #cling