|
From: | Alaric Snell-Pym |
Subject: | Re: [Chicken-users] using mmap files as strings? |
Date: | Tue, 02 Nov 2010 22:17:10 +0000 |
User-agent: | Mozilla/5.0 (X11; U; NetBSD amd64; en-US; rv:1.9.1.9) Gecko/20100520 Lightning/1.0b2pre Shredder/3.0.4 |
On 11/02/10 14:53, Felix wrote:
From: Alaric Snell-Pym<address@hidden> Subject: Re: [Chicken-users] using mmap files as strings? Date: Tue, 02 Nov 2010 13:22:01 +0000Then have blobs, strings, srfi-4 vectors, and friends all have the option of being a reference to one of the above with an offset and limit, so they can be views into arbitrary data from external sources.That's the problem: all primitives on those objects have to check whether they have to handle such a "view" object. Handling these special cases are too costly and prohibit optimizations.
*nod* that's the downside. I've been wondering how to address it. One way would be to give every blobby object a small header with a data pointer and offset in (the rest of it either containing the data, or a reference to the real store of the data so it gets noticed by the GC, as the raw pointer may be into the middle of it). This would make for a double indirection to get to the data in every operation, but that would be done just once for bulk operations written in raw C.
cheers, felix
ABS -- Alaric Snell-Pym http://www.snell-pym.org.uk/alaric/
[Prev in Thread] | Current Thread | [Next in Thread] |