digitalmars.D - Performance, operating system in D?
- Will (8/8) Oct 06 2005 I read that modern garbage collected languages are faster than non-gbc o...
- clayasaurus (3/15) Oct 06 2005 Maybe this will help.
- James Dunne (29/41) Oct 06 2005 Let's see... It's my take that garbage collected languages' performance
- Dave (17/25) Oct 10 2005 The current D GC implementation is decent but hasn't had the large amoun...
- Don Clugston (17/29) Oct 10 2005 You need to be a little careful with such generalisations.
- Walter Bright (7/9) Oct 10 2005 share?
- Sean Kelly (5/14) Oct 10 2005 That would be darn nice. And since the OS handles context switching and...
- Jarrett Billingsley (5/11) Oct 10 2005 I wonder if Vista will have a built-in GC facility, as .Net will become ...
- Trevor Parscal (7/16) Oct 11 2005 I still am looking for some other ambitious programmers to work on a D k...
- Thomas Kühne (4/23) Oct 11 2005 Are you talking about a "day job" or spare time?
- Ameer Armaly (4/30) Oct 11 2005 I would be willing to help, though I'll admit that I'm no expert at all ...
- The Neuromancer (5/38) Oct 11 2005 I really want to write a OS in D (I have some experience), but I have to...
- J C Calvarese (5/18) Oct 11 2005 FYI, here are some notes about some similar D projects:
- JT (7/15) Oct 11 2005 Build it and they will come.
- pragma (8/27) Oct 11 2005 Sadly, I'm pretty much tapped for development time, but I'd be happy to ...
- Kyle Furlong (3/31) Oct 11 2005 As much programming time as I have, this sounds like a worthy and fun
I read that modern garbage collected languages are faster than non-gbc ones. Given that all other thins (compiler optimization quality) are equal, I suppose that's true for an application program. If one wants to make an operating system on the other hand, which be its definition must manage memory itself(?) is it possible to achieve the same control and performance as if it was made in C/C++? And for application programs - is there a D gc DLL that D programs can share? Somewhat out-of-topic but Will Windows Vista have gc built-in? are there some good tests of D performance vs C?
Oct 06 2005
Will wrote:I read that modern garbage collected languages are faster than non-gbc ones. Given that all other thins (compiler optimization quality) are equal, I suppose that's true for an application program. If one wants to make an operating system on the other hand, which be its definition must manage memory itself(?) is it possible to achieve the same control and performance as if it was made in C/C++? And for application programs - is there a D gc DLL that D programs can share? Somewhat out-of-topic but Will Windows Vista have gc built-in? are there some good tests of D performance vs C?Maybe this will help. http://shootout.alioth.debian.org/benchmark.php?test=all&lang=dlang&sort=fullcpu
Oct 06 2005
Will wrote:I read that modern garbage collected languages are faster than non-gbc ones. Given that all other thins (compiler optimization quality) are equal, I suppose that's true for an application program. If one wants to make an operating system on the other hand, which be its definition must manage memory itself(?) is it possible to achieve the same control and performance as if it was made in C/C++? And for application programs - is there a D gc DLL that D programs can share? Somewhat out-of-topic but Will Windows Vista have gc built-in? are there some good tests of D performance vs C?Let's see... It's my take that garbage collected languages' performance derives directly from two things: 1) quality of implementation of the GC 2) frequency of memory allocations/deallocations in the compiled program For a language like D, where the new operator is a common occurence, the performance of the application is directly related to the performance of the GC. D's current GC implementation leaves a bit to be desired and is not an implementation of a top-notch GC. It is very simple and gets the job done reasonably well for most applications. Moving on... No DLL housing currently exists for D's GC (that I'm aware of), and I don't think you'd want to put one in a DLL either. If you're attempting to write an OS from scratch using D, then it is a good idea to learn the ins and outs of phobos. If I were in your position, I would scratch the phobos GC and most of phobos itself in your operating system. I would keep only the very basic parts of the code which are necessary in order for D to work - things like bit slicing functions, the Object class, TypeInfos, etc. Then, I would write a top-notch, tested, garbage collection implementation using proven concepts from the latest research on the topic. However, you must consider the memory model of whatever type of OS you're trying to write. If you're writing a multi-tasking, multi-user OS, design your GC such that sufficient access protections are in place. I hope this can get you headed in the right direction, and I hope to see Will/OS in the future! -- Regards, James Dunne
Oct 06 2005
In article <di4149$69$1 digitaldaemon.com>, Will says...I read that modern garbage collected languages are faster than non-gbc ones. Given that all other thins (compiler optimization quality) are equal, I suppose that's true for an application program. If one wants to make an operating system on the other hand, which be its definition must manage memory itself(?) is it possible to achieve the same control and performance as if it was made in C/C++?The current D GC implementation is decent but hasn't had the large amount of tweaking that others have had (i.e.: Sun Java and .NET). It is now a conservative collector, and swapping to a generational/copying algorithm would probably increase performance quite a bit for things like allocating lots of small objects, which is probably the biggest weakness right now. OTOH, a change like that would probably make the GC less space efficient overall which is a current strength I think.And for application programs - is there a D gc DLL that D programs can share? Somewhat out-of-topic but Will Windows Vista have gc built-in?The beauty of D is that you can use traditional malloc/free memory management, and you can also still use the GC to manage a block of memory used to relatively easily "pool" a group of often allocated objects. Along with that, D has two other advantages over most other GC'd languages: easy array slicing and built-in stack allocated UDT's (D structs). AFAICT, Vista will not have the GC built-in unless your app. runs under the .NET runtime.are there some good tests of D performance vs C?Here are some results you can take with a grain of salt <g> http://shootout.alioth.debian.org/benchmark.php?test=all&lang=all&sort=fullcpu
Oct 10 2005
Will wrote:I read that modern garbage collected languages are faster than non-gbc ones.You need to be a little careful with such generalisations. In practice, Doug Lea Malloc is hard to beat in most situations, but it is very easy to do better than Microsoft's default malloc. The only hard data I've seen shows that the best GC outperforms dlmalloc once it has access to 5-10 times as much memory as is allocated at any given time. Sc... * in the cases where GC is faster, it will use 10x as much memory * There is huge variation in quality of implementation. * Doug Lea malloc is probably nearly as good as malloc can be, GC is much more complicated and is less well optimised, so it is likely to improve with time. * Right now, the languages (apart from D) which produce the fastest programs are not gc-based. But that's not because they don't use gc, it's because they were designed for speed. * The benefits of gc are in code simplicity, not speed.Given that all other thins (compiler optimization quality) are equal, I suppose that's true for an application program. If one wants to make an operating system on the other hand, which be its definition must manage memory itself(?) is it possible to achieve the same control and performance as if it was made in C/C++? And for application programs - is there a D gc DLL that D programs can share? Somewhat out-of-topic but Will Windows Vista have gc built-in? are there some good tests of D performance vs C?
Oct 10 2005
"Will" <Will_member pathlink.com> wrote in message news:di4149$69$1 digitaldaemon.com...And for application programs - is there a D gc DLL that D programs canshare?Somewhat out-of-topic but Will Windows Vista have gc built-in?I've always thought that gc ought to be a service provided by the operating system. There are so many garbage collected languages in common use - having it in the o.s. makes it worthwhile to make a very good one, and so all the languages benefit.
Oct 10 2005
In article <diekpi$qev$1 digitaldaemon.com>, Walter Bright says..."Will" <Will_member pathlink.com> wrote in message news:di4149$69$1 digitaldaemon.com...That would be darn nice. And since the OS handles context switching and such, it seems a natural fit. Does the Java OS have built-in GC? Or maybe one of the other fancy thin-client OSes? SeanAnd for application programs - is there a D gc DLL that D programs canshare?Somewhat out-of-topic but Will Windows Vista have gc built-in?I've always thought that gc ought to be a service provided by the operating system. There are so many garbage collected languages in common use - having it in the o.s. makes it worthwhile to make a very good one, and so all the languages benefit.
Oct 10 2005
"Walter Bright" <newshound digitalmars.com> wrote in message news:diekpi$qev$1 digitaldaemon.com...I've always thought that gc ought to be a service provided by the operating system. There are so many garbage collected languages in common use - having it in the o.s. makes it worthwhile to make a very good one, and so all the languages benefit.I wonder if Vista will have a built-in GC facility, as .Net will become more intimately integrated into the OS? Maybe D.Net would be a worthwhile investment.. ;)
Oct 10 2005
In article <diekpi$qev$1 digitaldaemon.com>, Walter Bright says..."Will" <Will_member pathlink.com> wrote in message news:di4149$69$1 digitaldaemon.com...I still am looking for some other ambitious programmers to work on a D kernel that can run multiple types of compiled executables (ELF, PE, COFF, etc)... Than, you could just GC at the OS level, and .. yeah.. Do something amazing you know.. Any takers? Thanks, Trevor ParscalAnd for application programs - is there a D gc DLL that D programs canshare?Somewhat out-of-topic but Will Windows Vista have gc built-in?I've always thought that gc ought to be a service provided by the operating system. There are so many garbage collected languages in common use - having it in the o.s. makes it worthwhile to make a very good one, and so all the languages benefit.
Oct 11 2005
In article <difq92$t5v$1 digitaldaemon.com>, Trevor Parscal says...In article <diekpi$qev$1 digitaldaemon.com>, Walter Bright says...Are you talking about a "day job" or spare time? ;) Thomas"Will" <Will_member pathlink.com> wrote in message news:di4149$69$1 digitaldaemon.com...I still am looking for some other ambitious programmers to work on a D kernel that can run multiple types of compiled executables (ELF, PE, COFF, etc)... Than, you could just GC at the OS level, and .. yeah.. Do something amazing you know.. Any takers?And for application programs - is there a D gc DLL that D programs canshare?Somewhat out-of-topic but Will Windows Vista have gc built-in?I've always thought that gc ought to be a service provided by the operating system. There are so many garbage collected languages in common use - having it in the o.s. makes it worthwhile to make a very good one, and so all the languages benefit.
Oct 11 2005
"Trevor Parscal" <Trevor_member pathlink.com> wrote in message news:difq92$t5v$1 digitaldaemon.com...In article <diekpi$qev$1 digitaldaemon.com>, Walter Bright says...I would be willing to help, though I'll admit that I'm no expert at all on such things; a D kernel would rock though."Will" <Will_member pathlink.com> wrote in message news:di4149$69$1 digitaldaemon.com...I still am looking for some other ambitious programmers to work on a D kernel that can run multiple types of compiled executables (ELF, PE, COFF, etc)... Than, you could just GC at the OS level, and .. yeah.. Do something amazing you know.. Any takers?And for application programs - is there a D gc DLL that D programs canshare?Somewhat out-of-topic but Will Windows Vista have gc built-in?I've always thought that gc ought to be a service provided by the operating system. There are so many garbage collected languages in common use - having it in the o.s. makes it worthwhile to make a very good one, and so all the languages benefit.Thanks, Trevor Parscal
Oct 11 2005
In article <dig9bf$1aov$1 digitaldaemon.com>, Ameer Armaly says..."Trevor Parscal" <Trevor_member pathlink.com> wrote in message news:difq92$t5v$1 digitaldaemon.com...I really want to write a OS in D (I have some experience), but I have to wait full debugging support for Linux. I only started to code something based on my old code :-) I'll use the GC in the kernel, but I'll wait to add user-level GC facilities.In article <diekpi$qev$1 digitaldaemon.com>, Walter Bright says..."Will" <Will_member pathlink.com> wrote in message news:di4149$69$1 digitaldaemon.com...I still am looking for some other ambitious programmers to work on a D kernel that can run multiple types of compiled executables (ELF, PE, COFF, etc)... Than, you could just GC at the OS level, and .. yeah.. Do something amazing you know.. Any takers?And for application programs - is there a D gc DLL that D programs canshare?Somewhat out-of-topic but Will Windows Vista have gc built-in?I've always thought that gc ought to be a service provided by the operating system. There are so many garbage collected languages in common use - having it in the o.s. makes it worthwhile to make a very good one, and so all the languages benefit.I would be willing to help, though I'll admit that I'm no expert at all on such things; a D kernel would rock though.Thanks, Trevor Parscal
Oct 11 2005
In article <digph8$1qhp$1 digitaldaemon.com>, The Neuromancer says...In article <dig9bf$1aov$1 digitaldaemon.com>, Ameer Armaly says....."Trevor Parscal" <Trevor_member pathlink.com> wrote in message news:difq92$t5v$1 digitaldaemon.com...In article <diekpi$qev$1 digitaldaemon.com>, Walter Bright says...FYI, here are some notes about some similar D projects: http://www.prowiki.org/wiki4d/wiki.cgi?KernelWithD jcc7I really want to write a OS in D (I have some experience), but I have to wait full debugging support for Linux. I only started to code something based on my old code :-) I'll use the GC in the kernel, but I'll wait to add user-level GC facilities.Than, you could just GC at the OS level, and .. yeah.. Do something amazing you know.. Any takers?
Oct 11 2005
Build it and they will come. seriously tho, Ive been doing some thinking towards this end and eventually hope to do something like that. it would be interesting to see a real working os in D, i would definately be interested if you were to get something going. but im currently working on a few projects of my own. Trevor Parscal wrote:I still am looking for some other ambitious programmers to work on a D kernel that can run multiple types of compiled executables (ELF, PE, COFF, etc)... Than, you could just GC at the OS level, and .. yeah.. Do something amazing you know.. Any takers? Thanks, Trevor Parscal
Oct 11 2005
In article <difq92$t5v$1 digitaldaemon.com>, Trevor Parscal says...In article <diekpi$qev$1 digitaldaemon.com>, Walter Bright says...Sadly, I'm pretty much tapped for development time, but I'd be happy to do some testing once you get a bootable image put together (or even a proof of concept of some kind). Outside that, I'm working hard on getting my act together (my machine 'sploded recently) to push the next milestone out for DDL... which I'm sure will be helpful for this project. Now all you need is a name... I gather that "DOS" is already taken. ;) - EricAnderton at yahoo"Will" <Will_member pathlink.com> wrote in message news:di4149$69$1 digitaldaemon.com...I still am looking for some other ambitious programmers to work on a D kernel that can run multiple types of compiled executables (ELF, PE, COFF, etc)... Than, you could just GC at the OS level, and .. yeah.. Do something amazing you know.. Any takers?And for application programs - is there a D gc DLL that D programs canshare?Somewhat out-of-topic but Will Windows Vista have gc built-in?I've always thought that gc ought to be a service provided by the operating system. There are so many garbage collected languages in common use - having it in the o.s. makes it worthwhile to make a very good one, and so all the languages benefit.
Oct 11 2005
Trevor Parscal wrote:In article <diekpi$qev$1 digitaldaemon.com>, Walter Bright says...As much programming time as I have, this sounds like a worthy and fun effort. Would this take the place of Terra in your schedule?"Will" <Will_member pathlink.com> wrote in message news:di4149$69$1 digitaldaemon.com...I still am looking for some other ambitious programmers to work on a D kernel that can run multiple types of compiled executables (ELF, PE, COFF, etc)... Than, you could just GC at the OS level, and .. yeah.. Do something amazing you know.. Any takers? Thanks, Trevor ParscalAnd for application programs - is there a D gc DLL that D programs canshare?Somewhat out-of-topic but Will Windows Vista have gc built-in?I've always thought that gc ought to be a service provided by the operating system. There are so many garbage collected languages in common use - having it in the o.s. makes it worthwhile to make a very good one, and so all the languages benefit.
Oct 11 2005