checkpoint

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
Fix performance issue

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
Remove duplicate code

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>