optimize allID benchmark