[plt-scheme] reading a whole file

From: Thomas Chust (chust at web.de)
Date: Mon Nov 10 12:49:54 EST 2008

Richard Cleis schrieb:
> [...] The file>string issue is driven by performance, perhaps due to the
> inability to generalize interfaces between user memory, os memory, disk
> memory, and disk media. [...] Even if a program asks for 1 character, much
> more relevant data probably ended up in memory yet there aren't enough ways
> to optimize access to it. [...]


what about adding support for memory mapping to PLT Scheme? This would
allow you to turn a whole file into a mutable or immutable byte string
without explicitly loading it into memory (the operating system manages
the loading and storing of the file's relevant blocks as required).

I think this could solve both the convenience and the performance issues
discussed in this thread.


Posted on the users mailing list.