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