The efficiency of star formation in clustered and distributed regions