Re: ldexp and frexp benchmark between Mir, C and Phobos

2018-12-29 Thread kinke via Digitalmars-d-announce

On Friday, 28 December 2018 at 19:48:28 UTC, 9il wrote:

LDC, macos x64:
---
 float 
ldexp (Phobos time / Mir time) = 2.55584
ldexp (  stdc time / Mir time) = 0.773019
frexp (Phobos time / Mir time) = 1.04093
frexp (  stdc time / Mir time) = 1.748
---
 double 
ldexp (Phobos time / Mir time) = 2.49162
ldexp (  stdc time / Mir time) = 1.31868
frexp (Phobos time / Mir time) = 0.937906
frexp (  stdc time / Mir time) = 1.82241
---
 real 
ldexp (Phobos time / Mir time) = 0.999327 (LDC Phobos uses C 
func for real)
ldexp (  stdc time / Mir time) = 0.969467 (LDC Mir uses C func 
for real)

frexp (Phobos time / Mir time) = 1.02512
frexp (  stdc time / Mir time) = 1.77901


Any chance the multi-precision ldexp can be upstreamed to Phobos 
(which currently uses real precision for the float/double 
overloads, which explains the suboptimal performance)? It'd make 
a *lot* more sense there, instead of having it in a separate 
library. It's well-known that there's a lot of remaining std.math 
functions which need proper single/double precision 
implementations, and ldexp is one of them.


Re: DLS (D Language Server) v0.20

2018-12-29 Thread Per Nordlöw via Digitalmars-d-announce
On Friday, 28 December 2018 at 22:52:40 UTC, Laurent Tréguier 
wrote:
I haven't looked into Emacs yet, maybe I'll do that in the 
coming days.



[1] https://github.com/emacs-lsp/lsp-mode
[2] https://github.com/joaotavora/eglot


Thanks!


Re: ldexp and frexp benchmark between Mir, C and Phobos

2018-12-29 Thread 9il via Digitalmars-d-announce

On Saturday, 29 December 2018 at 12:35:03 UTC, kinke wrote:

On Friday, 28 December 2018 at 19:48:28 UTC, 9il wrote:
Any chance the multi-precision ldexp can be upstreamed to 
Phobos (which currently uses real precision for the 
float/double overloads, which explains the suboptimal 
performance)? It'd make a *lot* more sense there, instead of 
having it in a separate library. It's well-known that there's a 
lot of remaining std.math functions which need proper 
single/double precision implementations, and ldexp is one of 
them.


Yes, Mir is Boost licensed, but I don't work on Phobos anymore. 
Mir libraries are going to be independent of Phobos.


Re: ldexp and frexp benchmark between Mir, C and Phobos

2018-12-29 Thread Iain Buclaw via Digitalmars-d-announce
On Fri, 28 Dec 2018 at 20:50, 9il via Digitalmars-d-announce
 wrote:
>
> ldexp and frexp are base building blocks for a lot of math
> functions.
>
> Here is a small benchmark that compares Mir, C and Phobos
> implementations:
>
> https://github.com/libmir/mir-core/blob/master/bench_ldexp_frexp.d
>
> Mir ldexp is 2.5 (5.5 - dmd) times faster for double and float.
>

You could double the speed of ldexp if you actually used the
checkedint compiler intrinsics rather than implementing it yourself.

Using libm's ldexp() is also likely going to be 2-5x slower than using
the implementation you've written for mir.ldexp().  For one, your
version will be inlined!

-- 
Iain


Release Candidate [was: Re: Beta 2.084.0]

2018-12-29 Thread Martin Nowak via Digitalmars-d-announce
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

On 12/17/18 10:38 PM, Martin Nowak wrote:

Release Candidate for 2.084.0 is live now.

> http://dlang.org/download.html#dmd_beta 
> http://dlang.org/changelog/2.084.0.html
> 
> As usual please report any bugs at https://issues.dlang.org
> 
> -Martin
-BEGIN PGP SIGNATURE-

iQIzBAEBCgAdFiEEpzRNrTw0HqEtE8TmsnOBFhK7GTkFAlwnkPYACgkQsnOBFhK7
GTm3xQ/+JJjaMWDy0VmPDHitIyrQDp0j+enopO0wIy1Xi/a9JIyo7IcsXGbyJ7w2
9aH7qJ/FJ7xHibra9ROjh+lLuyCY1e/qKIzDNO5up047nOZs9+nbfFp68Mzel5zc
f7XtdE/sNn9ZUM0mQYx+8w15BiGVGSkF1q6eVTGWgiS+n97YBwRIEIYZbWPMqZyB
b9A3lUKGh9nLIvKWyceqR9Dx0Wm/8rYhT9lbHD4yyZuiY8YiKTCPuye7/NaPt4BX
WUNZxwEMN4DJ8PSzinBLMLUQIZvFSnD5FmKy2/u3Us/8iTZamtFAGcO1ZcWRObtf
zzQKDg8jBZG9MbIJehsHCr78qsMbnxJ4gQSskln/tN/Zt8VUH18wbwGnvyrmXMT/
BYvViPSjcGYYgPKy2k+0nWR2F+wPPQZjwkq8ZSVPEY1R7vxFRIl+g+kNbJd/Ci8h
PdAbMhk1TCFM/wxRY0KVB+pKQlyGz9AyHDKUm2lRhjSRjTtE/9/JlxzDo0p5zxj9
uHB58MUklK5oFFUjbTYCT5UUsp/hxg/tTg8kQYMHEYBa7pxzvsd6TGhzVScGzynL
62MBSix4wGO6qDgZpJnVfSFeLDGvZhwQrCIC+A1pOc44DiZ5ADHdaYPTK9jZa5VH
tmlsDQyKqTEn9hZNoL7aPVeC0hGxAsTwDayaP2y5OAtEhWxBPzg=
=7nJe
-END PGP SIGNATURE-


Re: ldexp and frexp benchmark between Mir, C and Phobos

2018-12-29 Thread 9il via Digitalmars-d-announce

On Saturday, 29 December 2018 at 15:15:48 UTC, Iain Buclaw wrote:
On Fri, 28 Dec 2018 at 20:50, 9il via Digitalmars-d-announce 
 wrote:


ldexp and frexp are base building blocks for a lot of math 
functions.


Here is a small benchmark that compares Mir, C and Phobos 
implementations:


https://github.com/libmir/mir-core/blob/master/bench_ldexp_frexp.d

Mir ldexp is 2.5 (5.5 - dmd) times faster for double and float.



You could double the speed of ldexp if you actually used the 
checkedint compiler intrinsics rather than implementing it 
yourself.


Using libm's ldexp() is also likely going to be 2-5x slower 
than using
the implementation you've written for mir.ldexp().  For one, 
your

version will be inlined!


Mir has support for LLVM checkedint intrinsics. GDC checkedint 
intrinsics are not yet integrated in Mir.


https://github.com/libmir/mir-core/blob/master/source/mir/checkedint.d


Re: DLS (D Language Server) v0.20

2018-12-29 Thread Laurent Tréguier via Digitalmars-d-announce

On Friday, 28 December 2018 at 20:44:30 UTC, Per Nordlöw wrote:
I'm using DCD through my beloved Emacs. Is there a more 
powerful Emacs+DLS-solution ready for use?


I looked into lsp-mode a bit more, and actually, after installing 
it, its dependencies and d-mode, a few lines of configuration in 
Emacs' init file are enough apparently:


(require 'lsp)
(add-hook 'd-mode-hook #'lsp)
(lsp-register-client
  (make-lsp-client
:new-connection (lsp-stdio-connection 
'("~/.dub/packages/.bin/dls-latest/dls"))

:major-modes '(d-mode)
:server-id 'dls))

After adding this, and installing DLS (`dub fetch dls; dub run 
dls:bootstrap`), it should be working.


Re: Release Candidate [was: Re: Beta 2.084.0]

2018-12-29 Thread Andre Pany via Digitalmars-d-announce

On Saturday, 29 December 2018 at 15:21:32 UTC, Martin Nowak wrote:

On 12/17/18 10:38 PM, Martin Nowak wrote:

Release Candidate for 2.084.0 is live now.

http://dlang.org/download.html#dmd_beta 
http://dlang.org/changelog/2.084.0.html


As usual please report any bugs at https://issues.dlang.org

-Martin


The Runtime.loadLibrary issue is a heavy regression 
(https://issues.dlang.org/show_bug.cgi?id=19498).


Is there a workaround for the issue? Should the workaround info 
be added to the release note?


Kind regards
Andre


Re: [neovim/vim] ncm2/ncm2-d autocompletion source for d

2018-12-29 Thread viniarck via Digitalmars-d-announce

On Friday, 28 December 2018 at 23:42:20 UTC, David wrote:

On Friday, 28 December 2018 at 12:41:27 UTC, David wrote:

On Thursday, 27 December 2018 at 21:50:04 UTC, David wrote:

sorry - I was wrong! It works as expected :-) - very nice! It 
probably conflicted with deoplete (or something else) which 
may still have been in the cache ...


Now, I am wondering how I can trigger "completion" for the 
signature which doesn't pop up


got it :-) The caveat is that also using ncm2-ultisnips

inoremap
ncm2_ultisnips#expand_or("\", 'n')


needs to be set after

inoremap   (pumvisible() ? "\\" : 
"\")


which was a bit random in my case with lazily loading plugins 
...


I'm glad you sorted it out, David. If you need further help just 
file an issue.




Re: [neovim/vim] ncm2/ncm2-d autocompletion source for d

2018-12-29 Thread viniarck via Digitalmars-d-announce

On Friday, 28 December 2018 at 00:06:21 UTC, Walter Bright wrote:

On 12/18/2018 2:12 PM, viniarck wrote:
neovim/vim8 users out there, if you'd like to have an 
alternative to deoplete, ncm2 is async and really fast, works 
out of the box, and it has integration with UltiSnippets to 
further expand all the arguments of the completion in place. 
So far, I've been quite satisfied with it, been using for 4 
months+, if you're interested check 
https://github.com/ncm2/ncm2-d out.



Geez, just when I (finally) add D color syntax highlighting to 
microEmacs, you go and one up me!


:)