1. 19
  1. 3

    I quickly read the article before bed yesterday (server seems overloaded this morning), and I’ll be really interested in seeing how he parallelized prettying-printing. In my own project, ppbert, parsing takes about 1/4 of the execution time and pretty-printing takes 3/4; I’d love to reduce the time it takes to pretty-print.

    1. 2

      Well, I threw 10 min at Googling for a CompSci or other work parallelizing pretty-printing. Gave me nothing. Most searches on compiler-related stuff gives me too much data. Tried Bing but it kept talking about parallel ports for printers. Nevermind on that.

      Point being that parallel algorithm and write-up for pretty-printers is worthwhile so there’s at least one of them in Google. :) Anyone wanting to experiment might also just put regular algorithms into parallel languages like Cilk or Chapel twiddling with data- and thread-parallel variants until they go faster. Warning that, if not used on hierarchically structured programs, the expected vs actual speedups might be all over the place since it might not be clear how to best divide the work. If it doesn’t parallelize cleanly, then Amdahl’s Law ruins it.

      That’s about the limit of what I remember on this stuff.

      1. 3

        Well, one prior work on parallel printing is GNU Parallel. Parallel printing is actually one of its most important feature and advertised as such at the front page. To quote, “GNU parallel makes sure output from the commands is the same output as you would get had you run the commands sequentially”.

        1. 1

          Appreciate the tip as that might be useful. For the search, I was aiming for something more efficient with it being pretty-printing done multi-threaded or otherwise in the same program. Still surprised GNU Parallel wasn’t in the results given the page has some terms I used.