home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / perl / 5009 < prev    next >
Encoding:
Internet Message Format  |  1992-07-28  |  1.8 KB

  1. Path: sparky!uunet!olivea!decwrl!pa.dec.com!nntpd2.cxo.dec.com!nntpd.lkg.dec.com!tkou02.enet.dec.com!jrdzzz.jrd.dec.com!jrd.dec.com!doi
  2. From: doi@jrd.dec.com (Hitoshi Doi)
  3. Newsgroups: comp.lang.perl
  4. Subject: Re: Perl and low-memory environments
  5. Message-ID: <Bs4Itn.28v@jrd.dec.com>
  6. Date: 29 Jul 92 00:03:23 GMT
  7. References: <1992Jul28.164057.14549@Princeton.EDU>
  8. Sender: usenet@jrd.dec.com (USENET News System)
  9. Organization: DEC Japan Research and Development Center
  10. Lines: 32
  11. Nntp-Posting-Host: usagi.jrd.dec.com
  12.  
  13. In article <1992Jul28.164057.14549@Princeton.EDU>, rjc@onion.princeton.edu (Raymond Chen) writes:
  14. # Although perl was written for 32-bit virtual memory UNIX boxes,
  15. # many of us use it on 16-bit low-memory machines like IBM PC's.
  16. # (Beyond spec, I know, but hey.)
  17.  
  18. You can run 32 bit programs if your PC is a 386:-)
  19.  
  20. # I'm wondering if any of my MS-DOS brethren have any space-saving
  21. # tips to share.  I'm already using the following tricks:
  22. #   - Use the symbol table as an associative array.
  23. #   - Don't load subroutines until they're needed.
  24. #   - Discard subroutines when they're no longer needed.
  25.  
  26. How's the performance with these tricks?
  27.  
  28. # But that's still not enough.  I'm thinking of moving all of main
  29. # into subroutines so that I can discard bits and pieces of main as
  30. # they are no longer needed.
  31. # Has anyone had experience tuning code for low-memory machines?
  32.  
  33. I tried, and failed.  Some of my perl programs are just too big to
  34. even load up on MS-DOS.  I get "out of memory" before it even runs.
  35. So I built perl with DJGPP.
  36.  
  37. One thing that helped a little (or it could have been my imagination)
  38. is to not use local() variables.
  39. --
  40. Hitoshi Doi, International Open Systems Engineering        doi@jrd.dec.com
  41. Japan Research and Development Center               decwrl!jrd.dec.com!doi
  42. Digital Equipment Corporation Japan          [from Japan: doi@dec-j.co.jp]
  43.