efficient population of upper trinagle in DataStats