POV-Ray : Newsgroups : povray.off-topic : Haskell raving : Re: Haskell raving Server Time
11 Oct 2024 23:10:56 EDT (-0400)
  Re: Haskell raving  
From: Tim Attwood
Date: 1 Nov 2007 02:34:35
Message: <4729818b$1@news.povray.org>
>  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.

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.


Post a reply to this message

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