June 15, 2016
On Wednesday, 15 June 2016 at 20:22:21 UTC, Jack Stouffer wrote:
> On Wednesday, 15 June 2016 at 19:39:59 UTC, Konstantin wrote:
>> Well I’m not sure about the 5% (MS says their write barrier overhead is comparable to the cost of a simple method call, namely 6.4ns: https://msdn.microsoft.com/en-us/library/ms973852.aspx), but yeah, there’s some tradeoff, for having a good GC.
>
> Even 1% overhead is unacceptable. Again, it's not reasonable for a systems language to have people pay for things they're not using.
>
> Write barriers will come to D over Walter's dead body.
>

Simple exercise. You have 100 000 servers. Your application suddenly become 1% slower. How angry is your CFO when he discovers how many new machines he needs to buy ?

June 16, 2016
On 16/06/2016 6:53 AM, Konstantin wrote:
> On Wednesday, 15 June 2016 at 17:02:11 UTC, rikki cattermole wrote:
>
>> Higher level languages like Java have the benefit of using pools and
>> optimizing for this usage pattern, D does and will never have this.
> Why don't you want the same for D?

Because we don't need them.
Sprinkling of fairy dust is for stories, not reality.

>> Well if you really insist to have a String class don't be too
>> surprised for some reason it doesn't have the same performance to say
>> Java.
> Some areas, like compiling, or producing HTML/XML/JSON documents,
> manipulate strings a lot.
> Other areas, like GUI editors for sufficiently complex documents, or
> level editors for videogame, need to efficiently manipulate huge trees
> of assorted small objects, not necessarily strings.

You're quite right and that is why we have a GC to begin with.
Its also part of the reason why std.experimental.allocator will allow you to create an allocator that is able to handle such work load and then free when complete.

>> Aka don't go around creating/destroying classes a huge amount unless
>> you have rolled some form of memory management policy such as
>> reserving memory for the GC to use.
> Yeah, that’s what I regularly do in C++ when I need to efficiently
> create/destroys many small objects. Sure, this typically leads to the
> best performance, e.g. because I can make the memory layout as cache
> friendly as humanly possible.
> But not all projects need that. And even for very performance demanding
> apps, not all components of the app need that.
> For such cases, a good GC (that just works well out of the box like
> .NET's GC does) can reduce development costs significantly.

So exactly like what our GC does do. Unless you're doing real time development in any form (e.g. sound) you won't need to do much to work around the GC.
June 17, 2016
On Wednesday, 15 June 2016 at 13:19:31 UTC, Konstantin wrote:

> Has anyone thought about taking GC from .NET and reusing it in D?

One significant point has been already mentioned: cost of write barriers.
I'd like to mention another factor: .NET GC is a copying one, it moves data around. One good feature of current D is it never moves data, so you can very easily call C and C++ code and pass pointers to your buffers and stuff and C/C++ code just takes these pointers and works with them as usual. No pinning, no marshaling, zero overhead. If you take a moving GC like .NET's, you immediately make all C/C++ interaction much harder, now you need to worry about pinning stuff or copying "managed" data to "unmanaged" memory and back. This is all costly both in terms of CPU cycles and of programmer cycles. You'll need "FFI", what most other GC-ed languages have to have, and D doesn't.
June 17, 2016
On Wednesday, 15 June 2016 at 13:38:33 UTC, ketmar wrote:
> On Wednesday, 15 June 2016 at 13:19:31 UTC, Konstantin wrote:
>> I don’t believe a community is capable of creating a good GC.
>
> you are wrong. and you definitely know nothing about garbage collection, virtual machines and code generation. i wonder why people keep coming with "suggestions" and "solutions" without even a small knowledge in problem field.

That's pretty harsh Ketmar.  It's obvious he knows the general ideas and was just wondering if using the .NET GC was a viable option.  I think responding to others in such a demeaning way is harmful to the D community as it isolates people.  It doesn't encourage people to be curious or want to start a discussion.  Having people, especially newcomers to D come in and make suggestions and solutions is a great thing for a community.  It means they saw enough potential in the language to want to know more and maybe even how they could contribute.
June 17, 2016
On Friday, 17 June 2016 at 04:20:23 UTC, Jonathan Marler wrote:
> On Wednesday, 15 June 2016 at 13:38:33 UTC, ketmar wrote:
>> On Wednesday, 15 June 2016 at 13:19:31 UTC, Konstantin wrote:
>>> [...]
>>
>> you are wrong. and you definitely know nothing about garbage collection, virtual machines and code generation. i wonder why people keep coming with "suggestions" and "solutions" without even a small knowledge in problem field.
>
> That's pretty harsh Ketmar.  It's obvious he knows the general ideas and was just wondering if using the .NET GC was a viable option.  I think responding to others in such a demeaning way is harmful to the D community as it isolates people.  It doesn't encourage people to be curious or want to start a discussion.  Having people, especially newcomers to D come in and make suggestions and solutions is a great thing for a community.  It means they saw enough potential in the language to want to know more and maybe even how they could contribute.

It also makes ketmar look like a tard and childish. Konstantin said he 'believed' something then ketmar responded with a fallacious attack. Maybe ketmar needs to take his meds? ;)
June 17, 2016
On Friday, 17 June 2016 at 21:47:36 UTC, Joerg Joergonson wrote:
> On Friday, 17 June 2016 at 04:20:23 UTC, Jonathan Marler wrote:
>> On Wednesday, 15 June 2016 at 13:38:33 UTC, ketmar wrote:
>>> On Wednesday, 15 June 2016 at 13:19:31 UTC, Konstantin wrote:
>>>> [...]
>>>
>>> you are wrong. and you definitely know nothing about garbage collection, virtual machines and code generation. i wonder why people keep coming with "suggestions" and "solutions" without even a small knowledge in problem field.
>>
>> That's pretty harsh Ketmar.  It's obvious he knows the general ideas and was just wondering if using the .NET GC was a viable option.  I think responding to others in such a demeaning way is harmful to the D community as it isolates people.  It doesn't encourage people to be curious or want to start a discussion.  Having people, especially newcomers to D come in and make suggestions and solutions is a great thing for a community.  It means they saw enough potential in the language to want to know more and maybe even how they could contribute.
>
> It also makes ketmar look like a tard and childish. Konstantin said he 'believed' something then ketmar responded with a fallacious attack. Maybe ketmar needs to take his meds? ;)

The idea that "a community" cannot create a GC is false.  It is not too complex as there are plenty of complex projects that are community driven.  A better assumption would be he doesn't believe THIS community can create a GC.  Not that I believe either because there is no reason a community driven GC would not be successful. There are plenty of good GCs out there like Java's for instance and work great for the ecosystem of the language but even if we had the greatest then some D devs would still be upset because a lot of D devs come from C/C++ and do not want the GC.    Both statements made assumptions and I do not think they are even close to the worst things said on this forum.  ppl chill a little.  Light one up, Drink one, put some rounds down range, whatever you gotta do to lighten up a little.
June 18, 2016
On Wednesday, 15 June 2016 at 20:43:55 UTC, deadalnix wrote:
> Simple exercise. You have 100 000 servers. Your application suddenly become 1% slower. How angry is your CFO when he discovers how many new machines he needs to buy ?

Probably not too angry at all.  This is still just a 1% budget
increase, which amounts to a rounding error.  Say those 100K
servers cost $2K each, meaning $200M for the lot.  An extra
$2M capital costs doesn't mean much in that context.  Perhaps
a bigger issue might be the ongoing extra cost for energy,
which applies to all the machines, not just tne new ones.

Look at it another way.  Anyone running 100_000 machines will
certainly not be running them all flat-out, to where a 1%
increase will push out a requirement for more machines.  One
needs extra capacity anyway to handle usual surges in the
volume of business being handled by the servers.

Look at it yet another way.  Sure, $2M is a big number in
absolute terms, for most of us.  But if I were that CFO,
instead of yelling about the problem, I'd go to the CTO
and tell him to take 100 machines out of service and have
the developers use them to profile the application and
find places where much more than 1% can be saved.
1 2 3
Next ›   Last »