Finding class template instantiations via runtime reflection (for openmethods)

2017-09-21 Thread Jean-Louis Leroy via Digitalmars-d
It did not take long! Someone tried to create templatized open methods and it didn't work right of the box. I expected that, but in fact there may be a bit of hope. You cannot have virtual function templates in C++ or in D because the layout of the vtables have to be known at compile time - but

Re: Simple web server benchmark - vibe.d is slower than node.js and Go?

2017-09-21 Thread bitwise via Digitalmars-d
On Thursday, 21 September 2017 at 18:55:04 UTC, Vadim Lopatin wrote: On Thursday, 21 September 2017 at 18:49:00 UTC, bitwise wrote: On Thursday, 21 September 2017 at 08:01:23 UTC, Vadim Lopatin wrote: [...] Doesn't vibe-d use Fibers? I tried to build a simple web server with a fiber-based a

Re: static array with inferred size

2017-09-21 Thread jmh530 via Digitalmars-d
On Wednesday, 20 September 2017 at 16:34:36 UTC, Andrei Alexandrescu wrote: On 09/20/2017 08:36 AM, jmh530 wrote: On Wednesday, 20 September 2017 at 12:10:47 UTC, Andrei Alexandrescu wrote: How would this be useful? -- Andrei Really just an additional convenience, instead of writing slice[0

Re: Simple web server benchmark - vibe.d is slower than node.js and Go?

2017-09-21 Thread bitwise via Digitalmars-d
On Thursday, 21 September 2017 at 08:01:23 UTC, Vadim Lopatin wrote: There is a simple set of simple web server apps written in several languages (Go, Rust, Scala, Node-js): https://github.com/nuald/simple-web-benchmark I've sent PR to include D benchmark (vibe.d). I was hoping it could show

Re: Simple web server benchmark - vibe.d is slower than node.js and Go?

2017-09-21 Thread Vadim Lopatin via Digitalmars-d
On Thursday, 21 September 2017 at 18:49:00 UTC, bitwise wrote: On Thursday, 21 September 2017 at 08:01:23 UTC, Vadim Lopatin wrote: There is a simple set of simple web server apps written in several languages (Go, Rust, Scala, Node-js): https://github.com/nuald/simple-web-benchmark I've sent

Re: Simple web server benchmark - vibe.d is slower than node.js and Go?

2017-09-21 Thread Vadim Lopatin via Digitalmars-d
On Thursday, 21 September 2017 at 17:13:16 UTC, Daniel Kozak wrote: Ok, maybe there is a some small improvments, but it is nothing what would make this faster than rust and still undere 30K on my pc More test results: On my Win10 PC, DMD/x86/libevent:27-29K, Go:31-33K

Re: Simple web server benchmark - vibe.d is slower than node.js and Go?

2017-09-21 Thread Daniel Kozak via Digitalmars-d
Ok, maybe there is a some small improvments, but it is nothing what would make this faster than rust and still undere 30K on my pc On Thu, Sep 21, 2017 at 7:02 PM, Daniel Kozak wrote: > in this situation I dont thing there will be difference > > On Thu, Sep 21, 2017 at 6:20 PM, Kagamin via Digit

Re: Simple web server benchmark - vibe.d is slower than node.js and Go?

2017-09-21 Thread Daniel Kozak via Digitalmars-d
in this situation I dont thing there will be difference On Thu, Sep 21, 2017 at 6:20 PM, Kagamin via Digitalmars-d < digitalmars-d@puremagic.com> wrote: > Other implementations use switch. https://dpaste.dzfl.pl/406dafbedbd9 is > it slower? >

Re: Simple web server benchmark - vibe.d is slower than node.js and Go?

2017-09-21 Thread Kagamin via Digitalmars-d
Other implementations use switch. https://dpaste.dzfl.pl/406dafbedbd9 is it slower?

Re: Simple web server benchmark - vibe.d is slower than node.js and Go?

2017-09-21 Thread Daniel Kozak via Digitalmars-d
with dmd 26K - 28K witlh ldc 27K - 29K On Thu, Sep 21, 2017 at 3:53 PM, Vadim Lopatin via Digitalmars-d < digitalmars-d@puremagic.com> wrote: > On Thursday, 21 September 2017 at 13:46:49 UTC, Daniel Kozak wrote: > >> Ok, after some more testing it seems it is almost sema with or without >> VibeMa

Re: static array with inferred size

2017-09-21 Thread Timon Gehr via Digitalmars-d
On 21.09.2017 12:33, Per Nordlöw wrote: On Wednesday, 20 September 2017 at 18:41:51 UTC, Timon Gehr wrote: Can that be done without breakages? -- Andrei No. Are thinking about     typeof([1,2]) changing from     int[] to     int[2] ? Yes, and everything that entails, for example:

Re: Simple web server benchmark - vibe.d is slower than node.js and Go?

2017-09-21 Thread Vadim Lopatin via Digitalmars-d
On Thursday, 21 September 2017 at 13:46:49 UTC, Daniel Kozak wrote: Ok, after some more testing it seems it is almost sema with or without VibeManualMemoryManagement Do you see any benefits from using LDC instead of DMD?

Re: Simple web server benchmark - vibe.d is slower than node.js and Go?

2017-09-21 Thread Daniel Kozak via Digitalmars-d
Ok, after some more testing it seems it is almost sema with or without VibeManualMemoryManagement On Thu, Sep 21, 2017 at 3:44 PM, Daniel Kozak wrote: > And it seems it is faster with GC. So removing VibeManualMemoryManagement > helped in some cases too. > > On Thu, Sep 21, 2017 at 3:43 PM, Dani

Re: Simple web server benchmark - vibe.d is slower than node.js and Go?

2017-09-21 Thread Daniel Kozak via Digitalmars-d
s'/sema/same/ On Thu, Sep 21, 2017 at 3:46 PM, Daniel Kozak wrote: > Ok, after some more testing it seems it is almost sema with or without > VibeManualMemoryManagement > > On Thu, Sep 21, 2017 at 3:44 PM, Daniel Kozak wrote: > >> And it seems it is faster with GC. So removing VibeManualMemoryM

Re: Simple web server benchmark - vibe.d is slower than node.js and Go?

2017-09-21 Thread Daniel Kozak via Digitalmars-d
And it seems it is faster with GC. So removing VibeManualMemoryManagement helped in some cases too. On Thu, Sep 21, 2017 at 3:43 PM, Daniel Kozak wrote: > BTW: I have changed dub.json a little too: > > { > "name": "vibedtest", > "targetName": "vibedtest", > "targetType": "executable"

Re: Simple web server benchmark - vibe.d is slower than node.js and Go?

2017-09-21 Thread Daniel Kozak via Digitalmars-d
BTW: I have changed dub.json a little too: { "name": "vibedtest", "targetName": "vibedtest", "targetType": "executable", "targetPath": "bin", "dependencies": { "vibe-d": "~>0.8.2-alpha.1" }, "subConfigurations": {"vibe-d": "libevent"}, "versions": [

Re: Simple web server benchmark - vibe.d is slower than node.js and Go?

2017-09-21 Thread Vadim Lopatin via Digitalmars-d
On Thursday, 21 September 2017 at 13:09:33 UTC, Daniel Kozak wrote: wrong version, this is my letest version: https://paste.ofcode.org/qWsQikdhKiAywgBpKwANFR Thank you! Updated.

Re: Simple web server benchmark - vibe.d is slower than node.js and Go?

2017-09-21 Thread Daniel Kozak via Digitalmars-d
wrong version, this is my letest version: https://paste.ofcode.org/qWsQikdhKiAywgBpKwANFR On Thu, Sep 21, 2017 at 3:01 PM, Daniel Kozak wrote: > my version: https://paste.ofcode.org/RLX7GM6SHh3DjBBHd7wshj > > On Thu, Sep 21, 2017 at 2:50 PM, Sönke Ludwig via Digitalmars-d < > digitalmars-d@purem

Re: Simple web server benchmark - vibe.d is slower than node.js and Go?

2017-09-21 Thread Daniel Kozak via Digitalmars-d
my version: https://paste.ofcode.org/RLX7GM6SHh3DjBBHd7wshj On Thu, Sep 21, 2017 at 2:50 PM, Sönke Ludwig via Digitalmars-d < digitalmars-d@puremagic.com> wrote: > Am 21.09.2017 um 14:41 schrieb Vadim Lopatin: > >> On Thursday, 21 September 2017 at 10:21:17 UTC, Sönke Ludwig wrote: >> >>> sh

Re: Simple web server benchmark - vibe.d is slower than node.js and Go?

2017-09-21 Thread Daniel Kozak via Digitalmars-d
my results: OS lang:config req/scomments === ===== == Linuxgo24K LinuxD:libevent27K4 threads LinuxD:libasync 26.5K 4 threads On Thu, Sep 21, 2017 at 2:41 PM, Vadim Lopatin via Digitalmars-d < digitalmars-d@pur

Re: Simple web server benchmark - vibe.d is slower than node.js and Go?

2017-09-21 Thread Sönke Ludwig via Digitalmars-d
Am 21.09.2017 um 14:41 schrieb Vadim Lopatin: On Thursday, 21 September 2017 at 10:21:17 UTC, Sönke Ludwig wrote: shared static this() { (...) } BTW, I'd recommend using     void main()     {     (...)     runApplication();     } instead and dropping the VibeD

Re: static array with inferred size

2017-09-21 Thread Steven Schveighoffer via Digitalmars-d
On 9/20/17 1:33 PM, ag0aep6g wrote: On 09/20/2017 06:55 PM, Steven Schveighoffer wrote: On 9/20/17 11:48 AM, Dgame wrote: [...] Unqual!T[n] s(T, size_t n)(T[n] arr) {  return arr; } auto a = "hallo".s; writeln(typeof(a).stringof); // char[5] [...] Still it can't handle the cas

Re: Simple web server benchmark - vibe.d is slower than node.js and Go?

2017-09-21 Thread Vadim Lopatin via Digitalmars-d
On Thursday, 21 September 2017 at 10:21:17 UTC, Sönke Ludwig wrote:     shared static this()     {     (...)     } BTW, I'd recommend using void main() { (...) runApplication(); } instead and dropping the VibeDefaultMain version in the package recipe. The

Re: static array with inferred size

2017-09-21 Thread Per Nordlöw via Digitalmars-d
On Wednesday, 20 September 2017 at 18:41:51 UTC, Timon Gehr wrote: Can that be done without breakages? -- Andrei No. Are thinking about typeof([1,2]) changing from int[] to int[2] ?

Re: Simple web server benchmark - vibe.d is slower than node.js and Go?

2017-09-21 Thread Sönke Ludwig via Digitalmars-d
    shared static this()     {     (...)     } BTW, I'd recommend using void main() { (...) runApplication(); } instead and dropping the VibeDefaultMain version in the package recipe. The old approach is planned to be faded out slowly, because it requires

Re: Simple web server benchmark - vibe.d is slower than node.js and Go?

2017-09-21 Thread Sönke Ludwig via Digitalmars-d
Am 21.09.2017 um 10:01 schrieb Vadim Lopatin: There is a simple set of simple web server apps written in several languages (Go, Rust, Scala, Node-js): https://github.com/nuald/simple-web-benchmark I've sent PR to include D benchmark (vibe.d). I was hoping it could show performance at least no

Re: Simple web server benchmark - vibe.d is slower than node.js and Go?

2017-09-21 Thread Vadim Lopatin via Digitalmars-d
On Thursday, 21 September 2017 at 08:18:51 UTC, Suliman wrote: Can it be issue with regex speed? auto reg = ctRegex!"^/greeting/([a-z]+)$"; Did you try without it? Regex is used for request paths like "/greeting/username" and not used for path "/" There is no big slowdown caused by regex. 4

Re: Simple web server benchmark - vibe.d is slower than node.js and Go?

2017-09-21 Thread Suliman via Digitalmars-d
Can it be issue with regex speed? auto reg = ctRegex!"^/greeting/([a-z]+)$"; Did you try without it?

Simple web server benchmark - vibe.d is slower than node.js and Go?

2017-09-21 Thread Vadim Lopatin via Digitalmars-d
There is a simple set of simple web server apps written in several languages (Go, Rust, Scala, Node-js): https://github.com/nuald/simple-web-benchmark I've sent PR to include D benchmark (vibe.d). I was hoping it could show performance at least not worse than other languages. But it appears