home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / tcl / 2272 < prev    next >
Encoding:
Text File  |  1992-12-31  |  1.4 KB  |  38 lines

  1. Newsgroups: comp.lang.tcl
  2. Path: sparky!uunet!eco.twg.com!twg.com!news
  3. From: "David Herron" <david@twg.com>
  4. Subject: Re: Tcl 6.4 Tcl_ParseVar bug OR gcc 2.2.2 bug?
  5. Message-ID: <1992Dec31.234740.14998@twg.com>
  6. Sensitivity: Personal
  7. Encoding:  18 TEXT , 4 TEXT 
  8. Sender: news@twg.com (USENET News System)
  9. Conversion: Prohibited
  10. Organization: The Wollongong Group, Inc., Palo Alto, CA
  11. Conversion-With-Loss: Prohibited
  12. Date: Thu, 31 Dec 1992 23:47:01 GMT
  13. Lines: 23
  14.  
  15. > |> In my opinion, Tcl should reallocate new space for its input and
  16. > |> manipulate that. With the use of gcc (and other ANSI conformant)
  17. > |> compilers becoming more widespread, ...
  18.  
  19. ..
  20. > Ultimately I should fix Tcl, but this probably isn't going to happen
  21. > for version 7.0.
  22.  
  23. Okay so since there's a bit of time to think about this problem ..
  24.  
  25. Tcl shouldn't *always* realloc its input &c.  Every time I've studied the
  26. performance of something, malloc() & friends turned out to be quite expensive
  27. and something to avoid when not necessary.  This proposal to strdup() all the
  28. time may be big a problem.
  29.  
  30. Some tricks might/could be pulled though since `most' command strings
  31. are short it'd be safe to allocate on the stack.  (At least on virtual-memory
  32. systems anyway).
  33.  
  34. <- David Herron <david@twg.com> (work) <david@davids.mmdf.com> (home)
  35. <-
  36. <- "Unix is a great idea being sold by companies who couldn't sell
  37. <- fast food in Somalia." - bill davidsen <davidsen@ariel.crd.GE.COM>
  38.