home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / perl / 5676 < prev    next >
Encoding:
Text File  |  1992-09-02  |  1.1 KB  |  30 lines

  1. Newsgroups: comp.lang.perl
  2. Path: sparky!uunet!news.mentorg.com!sdl!tal
  3. From: tal@Warren.MENTORG.COM (Tom Limoncelli)
  4. Subject: How fast is... (was Re: randomize.c)
  5. Message-ID: <1992Sep2.135055.4659@Warren.MENTORG.COM>
  6. Organization: Mentor Graphics -- IC Group
  7. References: <Bts28y.DJA@rahul.net> <AAS.92Aug31133620@rosmer.nr.no> <1992Aug31.183903.4143@cirrus.com> <1992Sep1.210332.26149@netlabs.com>
  8. Date: Wed, 2 Sep 1992 13:50:55 GMT
  9. Lines: 19
  10.  
  11. In <1992Sep1.210332.26149@netlabs.com> lwall@netlabs.com (Larry Wall) writes:
  12.  
  13. >      ......                      Subscripting, however, happens
  14. >constantly, so we optimize for that.
  15.  
  16. Are associative arrays optimized?  For example, many times I do:
  17.  
  18. if ( $foo{$thing} ne $frob ) {
  19.     $foo{$thing} += $fratz;
  20. }
  21.  
  22. Is there a one-entry cache or does it traverse the hash tables twice?
  23.  
  24. Tom
  25. -- 
  26. Tom Limoncelli -- tal@warren.mentorg.com (work) -- tal@plts.uucp (play)
  27. "Oh! I thought it was one of those useless demos of everything that
  28.     a GUI builder could do." -Anonymous person watching demo of
  29.          Solaris 2.0's graphical tool for managing NIS+
  30.