POV-Ray : Newsgroups : povray.off-topic : Haskell raving : Re: Haskell raving Server Time
11 Oct 2024 23:12:14 EDT (-0400)
  Re: Haskell raving  
From: Alain
Date: 1 Nov 2007 11:00:49
Message: <4729f831$1@news.povray.org>
Tim Attwood nous apporta ses lumieres en ce 2007/11/01 03:34:
>>  But in this case the data is one big string?
>>
>>  Someone else said that string are actually linked lists of characters
>> where each character is garbage-collected. This must require humongous
>> amounts of memory, especially considering that one character would only
>> require 1 byte...
> 
> Yeah, it does take a lot, and it uses unicode for characters too,
> I think I heard it takes about 12 bytes per character that way.
> It's perty bad on big files.
It's about 12 BITS per characters, on average, not BYTES! That's useing UTF8 
encoding. About 16 BITS per characters if using UTF16 encoding.
UTF8 is only 7 BITS per characters if you stick to only standard ASCII 
characters set, but it gets bigger if you also use extended ASCII or characters 
from foreign alphabets.
> 
> You can use the ByteString module though, it uses a single byte
> value for a character, and passes pointers and stuff around behind
> the scenes to avoid duplicating stuff that doesn't need to be.
> A ByteString is sort of a list of pointers to C style strings, but
> with all the pointers hidden. 
> 
> 


-- 
Alain
-------------------------------------------------
You know you have been raytracing for too long when the animation you
render will be finished after yourself.
Urs Holzer


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.