3 ms·
They were fast compared to contemporary machines (minicomputers like the PDP-10). What happened was. powerful micros came out and the technology in those and in
by bitwize 5y ago
They were fast compared to contemporary machines (minicomputers like the PDP-10). What happened was. powerful micros came out and the technology in those and in Lisp compilers for those machines eventually surpassed the LispM architecture in speed. Complacency and mismanagement at companies like Symbolics meant the LispM architecture never caught up, even when it moved to a microprocessor architecture in the 80s.
- pfdietz 5y agoThe single most important trick I remember for Lisp on stock hardware was implementing pointers to cons cells as pointers to the next byte, and doing car/cdr by -1(reg) and 3(reg) (or 7(reg) on a 64 bit machine). This automatically traps on non-conses without any extra cost.
- bitwize 5y agoOooooh, that is "square root magic constant" levels of dirty.
- pfdietz 5y agoAlso, it lets you implement fixnums with zero low order bits. That is, fixnum x is implemented as x << 2 (on 32 bit machines) or x << 3 (on 64 bit machines). With this encoding, addition and subtraction that is known to produce another fixnum can be done with ordinary add/sub instructions.
- rjsw 5y agoThe original SPARC CPU is designed to use this tag encoding scheme, section D.4 of the V8 Architecture Manual describes how to use it.
- pfdietz 5y agoYes, that gives you flagging/trapping on arithmetic if any args are not fixnums. Aside from that, the idea works on other architectures as well.