Excise the stupid fucking `set-*` opcodes
The book uses the horribly-confusingly-named `set-*` operations for handling
subterms in query mode. The author does this because he claims this is both
easier to understand and more performant. In reality it is neither of these
things.
If you just name the subterm-handling opcodes something not completely stupid,
like `handle-subterm-*` instead of `unify-*` it becomes obvious what they do.
Also, despite the fact that `put-*` instructions now need to set the WAM's
`mode`, we still get about a 10% speedup here, likely from some combination of
reducing the VM loop code size and simplifying the compilation process. So it's
not even more performant.
TL;DR: Just say "No" to `set-*`.
author |
Steve Losh <steve@stevelosh.com> |
date |
Sun, 10 Jul 2016 14:21:18 +0000 |
parents |
22e5e1250898 |
children |
(none) |
<i>Made with Lisp and love by [Steve Losh][] in Reykjavík, Iceland.</i>
[Steve Losh]: http://stevelosh.com/
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-15328874-3', 'auto');
ga('send', 'pageview');
</script>