Slow GC?
Vladimir Panteleev
thecybershadow at gmail.com
Fri Mar 14 06:12:26 PDT 2008
On Fri, 14 Mar 2008 15:00:48 +0200, bearophile <bearophileHUGS at lycos.com> wrote:
>>Phobos patch: http://d.puremagic.com/issues/show_bug.cgi?id=1923<
>
> I'd like to try that code; can I do it?
Yes, just apply the patch (to src/phobos/internal/gc/gcx.d) and rebuild Phobos (using the makefiles).
>>Improvement is also almost tenfold :)<
>
> Sorry for the potentially stupid question: is this an improvement in the text splitting time, in the final garbage collection time when the program is finished, or is it just a blind sum of both?
Of the total running time. The slowdown happens when D starts a garbage collection cycle while split() is running.
Here are the exact times for me:
== Before ==
loading time: 0.14
splitting time: 0.875
total execution time: 3.234 seconds.
== After ==
loading time: 0.063
splitting time: 0.156
total execution time: 0.358 seconds.
> General note: I think more people have to compare the speed of programs written in other languages (like Python, Java, OCaML, Clean, C with GCC, Perl, etc) to the same programs written in D, because this (often?) shows spots where D may need some improvements. I know D is a language in development still, so too much early optimization may be bad, but I think a bit of care in that regard may help anyway.
Good optimizations often require significant and complicated changes to the code. Luckily this one doesn't :)
--
Best regards,
Vladimir mailto:thecybershadow at gmail.com
More information about the Digitalmars-d
mailing list