Pictures of dataflow optimization

I've been working on a project to optimize FrTime for the last few months. The idea is to statically analyze a program in order to discover its dataflow dependencies, and then combine lots of little dataflow nodes that don't do much work into a smaller number of big dataflow nodes that do a significant amount of computation. Performance improves pretty much in direct proportion to the fraction of nodes removed, so this can lead to really big improvements.

On Friday I finally generated some graphs to visualize the difference between an optimized program and an unoptimized program. The result is pretty impressive, especially if you like pictures as much as I do. Here's the unoptimized version of a simple program that uses TexPict, an image and text compositing library:

And here's the optimized version:

Red arcs indicate nodes corresponding to conditionals (if statements), and blue nodes indicate data constructors (structs and lists). Black nodes are simple computation, such as addition or subtraction.

Posted on October 22, 2006 03:38 PM
More school articles

Comments

Can you post the programs these graphs represent?
They seem fairly small, but I want to be sure.
I'm thinking of an implementation that distributes (and redistributes) chunks
of graph to Erlang proceses, but this may require new semantics and rests on certain assumptions
(that I hope are true) about the local structure of the graph in large programs.

Posted by: leo at October 25, 2006 01:17 AM
Post a comment









Remember info?




Prove you're human. Type "human":