Subscribe

DMD and Phobos Code Review

I’ve been spending time in dmd (via gdc) and libphobos as a research project. While I have enjoyed writing D code I quickly have run into some ugly aspects of D.

DMD source:

* Ambiguous labels with copious use of gotos
* Commented out printfs for tracing support
* Class and struct definitions scattered across multiple files
* Bugs?!

Phobos Runtime:

* Use of a stop the world, mark and sweet garbage collector! Suckage for realtime :( * Signals SIGUSR1, SIGUSR2 are used to pause all threads while garbage is collected
 * Buggy meta-programming that results in strange segfaults in objectInvariant() and gc methods.
* Unpredictable thread stalls in the simulation
* Non-cache friendly touching of memory during marking and collection

Good GC research

Boehm collector

I’m kinda pissed because I realized I would have to rewrite the runtime and the garbage collector. I bet JY could easily handle that.

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Technorati
  • Reddit
  • Digg
  • del.icio.us
  • StumbleUpon
  • DZone
  • ThisNext

No related posts.

Trackback URI | Comments RSS

Leave a Reply