2 ms·
Lisp of course was originally invented for manipulating linked lists and it came about in an era where cache locality wasn't an issue because computers in 1959
by dreamcompiler 4y ago
Lisp of course was originally invented for manipulating linked lists and it came about in an era where cache locality wasn't an issue because computers in 1959 were speed limited by their CPUs rather than their memories.
Cdr coding [0] solves several problems with singly-linked (cons-style) lists including cache locality and the 2x storage overhead of these lists. But it's not typically used except in dedicated hardware e.g. Lisp machines. It could in principle be revived fairly easily on modern 64-bit Lisp systems on stock hardware -- especially if such systems provided immutable cons cells.
But it's probably not worthwhile because modern Lisp programmers (in Common Lisp at least) don't use lists all that much. CL has very nice adjustable arrays and hash tables that are easier and faster than lists for most purposes.
[0] https://en.m.wikipedia.org/wiki/CDR_coding https://en.m.wikipedia.org/wiki/CDR_coding