DB/DBMS in D

Chris R Miller lordsauronthegreat at gmail.com
Mon Feb 16 01:20:54 PST 2009


Vladimir A. Reznichenko wrote:
> Dear Mr./Ms.,
>
>
> I'd like to ask you about the garbage collector.
> It slows down an application, doesn't it?
>
> In case of DBMS, this is critical. I haven't found any articles or tests
> about this.
>
> Also it would be great to find out about memory management implemented in
> DMD: fragmentation, allocation, reallocation. And if wide-known algorithms are used there could it be named?
>
> The C/C++ is classic choice for such projects (DBMS), but the D language
> is great one and the best for me ). I want to find out abilities of using
> it.

I would argue the opposite: that in a long-running process such as an 
RDBMS you would *want* the garbage collector to ensure that there are no 
memory leaks.  You could have either a super-fast database which leaks 
memory (so your users would have to restart it periodically) OR you 
could use a garbage collector, take the performance penalty (not that 
much - quite frankly, complaining about the garbage collector is like 
complaining that the silverware is gold and not platinum) and have the 
assurance that your memory leakage will be kept to an absolute minimum 
(or not at all, if you remember to properly declare weak references).

Obviously it is possible to use a language like C++ and write code which 
doesn't leak memory... however, that level of effort isn't going to give 
you significant increases in performance compared to D.  D is just plain 
fast.



More information about the Digitalmars-d mailing list