3 ms·
Certainly interesting, but I'm not sure how well the performance of a prolog interpreter maps to other use cases. That benchmark looks too short to be a useful
by coder543 4y ago
Certainly interesting, but I'm not sure how well the performance of a prolog interpreter maps to other use cases.
That benchmark looks too short to be a useful measure of how JIT influences performance, otherwise I would ask how the regular Wasmer does in that benchmark too (since it seems like create-exe doesn't include a JIT).
- kevingadd 4y agoWasm also can't do computed goto for interpreters, so it's at a disadvantage for this benchmark in general
- still_grokking 4y agoIs the used interpreter built with computed goto?
- guipsp 4y agoSwitch tables tend to be computed goto based
- still_grokking 4y agoIs the interpreter we're talking about built this way?
- guipsp 4y agoEven if you write if...else a smart compiler will turn it into a switch table.
- still_grokking 4y agoCould you show an example? A Godbolt link would be nice!
- grose 4y agoHonestly I can't really say (I just ported it to WASM :-)), but here's more or less the start of the query loop: https://github.com/guregu/trealla/blob/main/src/query.c#L1733 https://github.com/guregu/trealla/blob/main/src/query.c#L173... I believe it's a bytecode but I know that function pointers are involved at least with the built-in predicates (see predicates.c).