Ciao Prolog being slow