Re: String types (formerly Re: AI & Darius Project Thoughts)

new topic     » topic index » view thread      » older message » newer message

On  0, Kat <kat at kogeijin.com> wrote:
> I hope Rob (or Karl) makes Eu even more conducive to what "RDS" stands 
> for, and adds "Small Footprint". It will be impossible for me to store 
> 100megabytes of a disk file in memory the way Eu stores things. With 
> 128megs for the OS, 400megs per iteration of the file in memory in Eu, and 
> the OS will slow to a snail crawl (from the sheer amount of memory to move 
> around) and "blow up" (from the amount of physical ram or disc thrashing).
> 
> If i can get a http proxy program like detailed in my previous email, i will
> be
> running thru at least 8 Gigabytes (i have resident here already), plus 
> whatever is on a customer's page (in this case, i guess another gigabyte) per 
> request for words misspelled or not previously indexed. Going from 
> 32bits/string_char to a typed 8bitsAscii/16bitUnicode would be a blessing.
> 
> Kat
> 

The flaw is that chracters are stored as 32-bit integers and strings are
sequences of those. I might be able to whip up a C library which would
provide functions to safely access C char arrays (so you would only have
to
access maybe 50 characters at a time from the array, saving memory (100
mb and
200 b is better than 400 mb right?)), but it might be redundant. Didnt
some
one find a way to "compress" a sequence, so that each element would have
space to hold 4 characters? (Hence 100mb would take 25 or so mil
elements,
and actually BE only 100 mb in memory, then you could use the same scheme
and access like 50 characters at a time, hence saving on memory.)

That said (i.e. that workarounds do exist) its still a bit of a kludge.
It'd be nice if Euphoria supported such things directly. (Maybe I'll whip
up the C library after all, and intergrate it as a built-in type into
Dredge ... it'd certainly be an interesting experiment, to say the
least.)

jbrown

PS

Does anyone have a simple parser or program that can determine whether
'=' is being used as assignment or comparision? (If not, I might take a
look at Py, but I'd prefer something a bit simpler to piece apart first.)

Linux User:190064
Linux Machine:84163


--

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu