chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Declare large expressions as read-only and not gc-ab


From: Sven Hartrumpf
Subject: Re: [Chicken-users] Declare large expressions as read-only and not gc-able?
Date: Mon, 06 Jan 2014 16:26:58 +0100 (CET)

Sun, 5 Jan 2014 15:25:38 -0600, zbigniewsz wrote:

> I'll bet if you define a 100MB literal, the resulting C file would be at 
> least a gigabyte and neither CHICKEN nor gcc would be able to handle it.  You 
> could try it and let us know.

You are right.
chicken (and others like bigloo) does not compile such a beast
and crashes with an error message.

> You could evict it theoretically, but for something that big, you may have to 
> create your own data structure in C and malloc it.

With object-evict, the program runs much slower without any progress,
so Felix' warning about object-evict seems to apply in my use case.

> I'm curious what this expression is for.

It's a letter tree for a fullform lexicon of a natural language
(more than 1 million entries).
Access times are short, hence I abstained from switching to a key-value
store on disk.
But the time wasted in GC makes me think - from time to time :-)

Ciao
Sven



reply via email to

[Prev in Thread] Current Thread [Next in Thread]