In #3265, we see that Scryer generates instructions such as:
...
get_constant(level(shallow),[],x(1)).
get_constant(level(shallow),[],x(2)).
...
set_constant([]).
...
where GNU Prolog emits:
...
get_nil(0),
get_nil(1),
...
unify_nil,
...
i.e, GNU Prolog uses specialized instructions where Scryer uses more general ones with the parameter [], causing overhead for creating, passing, decoding and analyzing this parameter when interpreting the instructions.
Since [] occurs so frequently in Prolog code, it seems worth considering such specialized instructions also in Scryer.
In #3265, we see that Scryer generates instructions such as:
where GNU Prolog emits:
i.e, GNU Prolog uses specialized instructions where Scryer uses more general ones with the parameter
[], causing overhead for creating, passing, decoding and analyzing this parameter when interpreting the instructions.Since
[]occurs so frequently in Prolog code, it seems worth considering such specialized instructions also in Scryer.