Re: handling state the database way

Jan Wielemaker <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
On 02/18/2014 11:48 AM, Abdallah, Samer wrote:
> I got the impression from the documentation that the recorded
> database is more efficient than assert/retract when updates are
> relatively common compared to reads.

Probably right if there is one value associated to the key. It also
allows for cyclic terms and terms with attributed variables. Hate to see
it is still useful for some stuff :-(

If there are many values associated to a key or if the associated terms
are large and lookup may fail early due to a partially instantiated
result in get_state/2, assert/retract probably wins.

	Cheers --- Jan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.