<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.sarg.dev/index.php?action=history&amp;feed=atom&amp;title=CDR_coding</id>
	<title>CDR coding - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.sarg.dev/index.php?action=history&amp;feed=atom&amp;title=CDR_coding"/>
	<link rel="alternate" type="text/html" href="https://wiki.sarg.dev/index.php?title=CDR_coding&amp;action=history"/>
	<updated>2026-04-21T03:47:28Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://wiki.sarg.dev/index.php?title=CDR_coding&amp;diff=31704&amp;oldid=prev</id>
		<title>imported&gt;Joswig at 19:48, 22 September 2024</title>
		<link rel="alternate" type="text/html" href="https://wiki.sarg.dev/index.php?title=CDR_coding&amp;diff=31704&amp;oldid=prev"/>
		<updated>2024-09-22T19:48:07Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{multiple issues|&lt;br /&gt;
{{Cleanup rewrite|date=April 2021}}&lt;br /&gt;
{{No footnotes|date=October 2011}}&lt;br /&gt;
}}&lt;br /&gt;
In [[computer science]] &amp;#039;&amp;#039;&amp;#039;CDR coding&amp;#039;&amp;#039;&amp;#039; is a [[data compression|compressed]] [[data (computing)|data representation]] for [[Lisp programming language|Lisp]] [[linked list]]s. It was developed and patented by the [[MIT Artificial Intelligence Laboratory]], and implemented in [[computer]] hardware in a number of [[Lisp machine]]s derived from the MIT [[CADR (computing system)|CADR]].&lt;br /&gt;
&lt;br /&gt;
CDR coding is in fact a fairly general idea; whenever a data object &amp;#039;&amp;#039;A&amp;#039;&amp;#039; ends in a [[reference]] to another data structure &amp;#039;&amp;#039;B&amp;#039;&amp;#039;, we can instead place the structure &amp;#039;&amp;#039;B&amp;#039;&amp;#039; itself there, overlapping and running off the end of &amp;#039;&amp;#039;A&amp;#039;&amp;#039;. By doing this we free the space required by the reference, which can add up if done many times, and also improve [[locality of reference]], enhancing performance on modern machines. The transformation is especially effective for the [[cons]]-based lists it was created for; we free about half of the space for each node we perform this transformation on.&lt;br /&gt;
&lt;br /&gt;
It is not always possible to perform this substitution, because there might not be a large enough chunk of free space beyond the end of A. Thus, some objects will end in a real reference, and some with the referenced object, and the machine must be able to tell by reading the final cell which one it is. This can be accomplished with some inefficiency in software by the use of [[tagged pointer]]s, which allow a pointer in a final position to be specifically tagged as such, but is best done in hardware.&lt;br /&gt;
&lt;br /&gt;
In the presence of [[mutable object]]s, CDR coding becomes more complex. If a reference is updated to point to another object, but currently has an object stored in that field, the object must be relocated, along with any other pointers to it. Not only are such moves typically expensive or impossible, but over time they cause [[fragmentation (computer)|fragmentation]] of the store. This problem is typically avoided by using CDR coding only on [[immutable object|immutable]] data structures.&lt;br /&gt;
&lt;br /&gt;
==External links==&lt;br /&gt;
* {{cite web | editor1 = Mark Kantrowitz | editor2 = Barry Margolin | url = http://www.faqs.org/faqs/lisp-faq/part2/section-9.html | work = FAQ: Lisp Frequently Asked Questions | title = (2-9) What is CDR-coding? | publisher = Advameg, Inc. | access-date = 2011-10-09 }}&lt;br /&gt;
* L. Peter Deutsch: A LISP Machine with Very Compact Programs. IJCAI 1973, Pages 697 - 703&lt;br /&gt;
* Greenblatt, R., LISP Machine Progress Report, memo 444, A.I.Lab., M.I.T., Cambridge, Mass., Aug. 1977.&lt;br /&gt;
* L. Peter Deutsch: Experience with a microprogrammed Interlisp system. MICRO 11: Proceedings of the 11th annual workshop on Microprogramming, November 1978, Pages 128–129&lt;br /&gt;
* {{cite book | first = John | last = Allen | title = The Anatomy of Lisp | publisher = McGraw-Hill | date = 1978 }} Pages 399-401&lt;br /&gt;
&lt;br /&gt;
[[Category:Lisp (programming language)]]&lt;br /&gt;
[[Category:Data compression]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{compu-prog-stub}}&lt;/div&gt;</summary>
		<author><name>imported&gt;Joswig</name></author>
	</entry>
</feed>