Yep! This linear-time algorithm described by Buchheim et al. is used by d3.layout.tree:
I hadn't looked at that in forever! Glad somebody found it useful :)
The layout is awful, so I just now limited the page width and centered the body, which should make it a bit more readable.
; http://dirk.jivas.de/papers/buchheim02improving.pdf
See also "Compact layout of Layered Trees".
Note that Bill Mill's blog post "Drawing Presentable Trees" presents the algorithm in a very readable manner: