# :- vs. =\> and "spurious" choice point creation or not in SSU (=\>)

**URL:** <https://swi-prolog.discourse.group/t/vs-and-spurious-choice-point-creation-or-not-in-ssu/4177>\
**Category:** Help!\
**Created:** [July 21, 2021, 3:24am UTC](https://swi-prolog.discourse.group/t/vs-and-spurious-choice-point-creation-or-not-in-ssu/4177 "2021-07-21T03:24:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![grossdan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/grossdan/32/23_2.png) [@grossdan](https://swi-prolog.discourse.group/u/grossdan)\
**Post date:** [July 21, 2021, 3:24am UTC](https://swi-prolog.discourse.group/t/vs-and-spurious-choice-point-creation-or-not-in-ssu/4177/1 "2021-07-21T03:24:31Z")

</div>

Hello,

When I write code with =\> rather than :- as below, looking at the vm code via vm\_list, i noticed that quite different code is generated, one making use of i\_ssu\_commit, and the other of i\_cut …

I wonder does the SSU solution create choice points upon encountering the lists in the head of both clauses or not …

My overall objective is to write performant code when for most cases a findall only finds one; and few cases a list of two, and the findall result need to be subsequently processed.

Currently, a first call to to processing predicate with a [First | Rest] which most of the cases leads to a Rest == [] – which then leads to a recursive call of [].

Instead i hope to resolve the one in one call only.

thanks,

Dan

```prolog
p_list([]) => true.

p_list([Element]) =>
	writeln(Element).
	
p_list([First | Rest]) =>
	p_list([First]),
	p_list(Rest).

?- p_list([a]).
a
true.

p_list([]).

p_list([Element]) :-
        !,
	writeln(Element).
	
p_list([First | Rest]) :-
	p_list([First]),
	p_list(Rest).

```

---

<div class="post-metadata">

**Author:** ![grossdan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/grossdan/32/23_2.png) [@grossdan](https://swi-prolog.discourse.group/u/grossdan)\
**Post date:** [July 21, 2021, 11:20am UTC](https://swi-prolog.discourse.group/t/vs-and-spurious-choice-point-creation-or-not-in-ssu/4177/4 "2021-07-21T11:20:39Z")

</div>

thank you for clarifying
