Skip to content

Dedicated []-related WAM instructions? #3267

@triska

Description

@triska

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions