[m-users.] explaining index use
Dirk Ziegemeyer
dirk at ziegemeyer.de
Fri Jul 22 18:41:30 AEST 2016
Hi Marcus,
>> Tomas wrote:
>>
>> "As nobody else has replied, I offer my suggestion: forget about fact tables and write your own indexing code."
>>
> Ok, thanks for the reality check. I thought I must be doing something wrong with the fact table feature. Also, besides the C compiler time and memory cost (which I could absorb), having many-way indexing of the fact table (many modes) seems to get slower in a worse than linear way. It doesn't even get to producing the C code for a many hours.
My experience with large fact tables is that they should be read at runtime with io.read instead of compiling them into the application. Thomas provided an example in this thread:
http://lists.mercurylang.org/archives/users/2015-February/007861.html
If you still want to read the fact table at compile time, Mercury offers the feature ":- pragma fact_table", which speeds up compilation time significantly but has other drawbacks and as far as I remember is planned to be marked as deprecated.
Dirk
More information about the users
mailing list