On Sat, 13 Nov 2004 17:43:37 -0500, Uri Guttman <[EMAIL PROTECTED]> wrote:
> >>>>> "BT" == Ben Tilly <[EMAIL PROTECTED]> writes:
> BT> In Perl I'd expect it to be possible but fragile. If Parrot could make> garbage collection it can be tricky.BT> it possible and not fragile, that would be great.
parrot will have mmap in bytecode which will be nice and fast and shared. i dunno about mmaped data as that is always an issue and with
Nah, mapping mmapped data to internal strings won't be a big deal, and GC doesn't care. The memory gets marked as external so parrot won't try to move it or free it, and if you wanted it could be COW as well so the mmap segment could be read-only. Or not, either way.
I see, so you compile Perl to bytecode, and then load it through mmap. Sure, it might be faster to compile Perl than to read the file. But if the bytecode has been used recently...
More than that, it means not loading in unused code, and deferring loading of code until you actually get to it to use. Not as big a deal for one-liners (which wouldn't get compiled to disk, I expect) but if you had something like, say, Tk or CGI compiled to bytecode you could see a significant win, since 90%+ of those modules never get used by any particular program. (And the commonly used library modules are potentially already loaded in system memory by another process)
--
Dan
--------------------------------------it's like this-------------------
Dan Sugalski even samurai
[EMAIL PROTECTED] have teddy bears and even
teddy bears get drunk
_______________________________________________
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm

