|
From: | Daniel Diaz |
Subject: | Re: Internal storage costs... |
Date: | Sat, 27 Jul 2013 14:52:37 +0400 |
Hi, Le 25 juil. 2013 à 02:35, Sean Charles <address@hidden> a écrit :
It is the same: an atom (even a character atom) or an integers needs a cell, ie. machine word (e.g. 32 ou 64 bits). The integer is encoded in the cell while for an atom it is the index of the corresponding entry in the atom table (an hash table). A list needs 2 cells (head and tail). NB: a structure with N arguments needs 1+N cells: 1 to encode the functor/arity et N cells for the sub-arguments (these N cells can contain an atom or an integer or a reference to a list or another compound term). BTW, note that there is a Prolog lexer you can use via the built-in predicates read_token/2-3. Daniel
-- Ce message a été vérifié par MailScanner pour des virus ou des polluriels et rien de suspect n'a été trouvé. |
[Prev in Thread] | Current Thread | [Next in Thread] |