pipes rewrite and simple benchmarks