FAST DIAGRAM FUNCTION HIERARCHY