Sped up the autotiling algorithm

Signed-off-by: Oz Ramos <labofoz@gmail.com>