The ETP improvements will show up on the 5.1 branch, it merely involves telling PG that the function needs to only be evaluated once per query by attaching the STABLE attribute to the CREATE OR REPLACE FUNCTION statement ...
Dave's taking care of this ...
Just for those of you who read Malte's comment and think ETP's slow and will remain slow!