3 ms·
The successful approach seems to be what Tcl (and Perl, I hear) do: one interpreter per thread, with message passing/shared memory.
by davidw 18y ago
The successful approach seems to be what Tcl (and Perl, I hear) do: one interpreter per thread, with message passing/shared memory.
- FooBarWidget 18y agoI don't know about Tcl, but Perl's approach is anything but successful. I have a Perl app of about 40000 lines. It takes 15 seconds to create a single thread, and after it's done, Perl segfaults. Every Perl thread duplicates the AST, making memory usage bloat to ridiculous proportions. I found out that forking new processes is faster and uses less memory.
- berntb 18y agoWhat Perl version on what OS?
- FooBarWidget 18y agoPerl 5.6.2 all the way up until 5.8.8. On Windows XP, Fedora Linux and Ubuntu Linux. Same results everywhere. Perl threads only work for apps less than 2000 lines. Go beyond that they'll blow up.
- davidw 18y agoTcl doesn't have a reputation for being "New! Exciting!" but it has a very reliable runtime.