refactor lua benchmark