Wed, 18 Mar 2009 13:48:55 -0400, Craig Black wrote: > bearophile Wrote: > >> Weed: >>> I want to offer the dialect of the language D2.0, suitable for use where >>> are now used C/C++. Main goal of this is making language like D, but >>> corresponding "zero-overhead principle" like C++: >>>... >>> The code on this language almost as dangerous as a code on C++ - it is a >>> necessary cost for increasing performance. >> >> No, thanks... >> >> And regarding performance, eventually it will come a lot from a good usage >> of multiprocessing, that in real-world programs may need pure functions and >> immutable data. That D2 has already, while C++ is less lucky. >> >> Bye, >> bearophile > > Multiprocessing can only improve performance for tasks that can run > in parallel. So far, every attempt to do this with GC (that I know > of) has ended up slower, not faster. Bottom line, if GC is the > bottleneck, more CPU's won't help. > > For applications where GC performance is unacceptable, we either need > a radically new way to do GC faster, rely less on the GC, or drop GC > altogether. > > However, in D, we can't get rid of the GC altogether, since the > compiler relies on it. But we can use explicit memory management > where it makes sense to do so. > > -Craig
I think that the "shared" memory concept in D2 is introduced specifically to improve multi-processing GC performance. There going to be thread-local GC for every thread allocating memory, and, since thread-local will be the default allocation strategy, most memory will be GCed without synchronizing with other threads.
