home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.forth
- Path: sparky!uunet!haven.umd.edu!darwin.sura.net!zaphod.mps.ohio-state.edu!cs.utexas.edu!torn!cunews!csi.uottawa.ca!news
- From: cbbrowne@csi.uottawa.ca (Christopher Browne)
- Subject: Re: Sampler Forth
- Message-ID: <1992Sep15.040007.4183@csi.uottawa.ca>
- Sender: news@csi.uottawa.ca
- Nntp-Posting-Host: prgv
- Organization: Dept. of Computer Science, University of Ottawa
- References: <15034@mindlink.bc.ca> <int452w.716514917@lindblat.cc.monash.edu.au>
- Date: Tue, 15 Sep 92 04:00:07 GMT
- Lines: 55
-
- In article <int452w.716514917@lindblat.cc.monash.edu.au> int452w@lindblat.cc.monash.edu.au (Michael R. Geddes) writes:
- >Nick_Janow@mindlink.bc.ca (Nick Janow) writes:
- >
- >>> (a) Forth is NEVER going to be the fastest executing language.
- >
- >>That's not necessarily true. If Forth had the support C has, it
- >>would also have nice systems with Forth CPUs, and I think for equal
- >>investment in hardware and programming time, the application in Forth
- >>would run a lot faster.
- >
- >I agree with this, but also, I have been told that better hardware can
- >often give you a reasonable increase in speed, but better algorithms
- >give you an order of magnitude increase in speed. Forth is 'slow' on
- >most systems because of the forth 'engine' that goes between machine
- >code and forth code.. Forth is 'fast' because you can code all the
- >critical bits with an efficient algorithm (not just by putting it into
- >assembler, you don't always get small critical bits.).
-
- The problem is that everybody takes a look at Forth and says "I can do
- THIS to the interpreter/threading mechanism/whatever" and uses it to
- essentially "redesign" the underlying data structures.
-
- They wind up putting the proverbial cart before the horse - they
- optimize before they know what the bottlenecks might be. And they're
- having so much fun optimizing that they tend to forget about actually
- putting something new and original in terms of FUNCTIONALITY into it.
-
- I'm currently working on a moderately large thesis project, using a
- combination of linear regression code (being misused :-)) to optimize
- linear programs, and a specialized "network simplex" solver.
-
- I could have great fun trying to optimize the Network Simplex code;
- (I've had great fun translating it from FORTRAN to C - NOT!)
- unfortunately, this optimization would be of very little value, since
- the bottleneck is in fact the regression code. For problems of
- trivial size, the time spent doing Simplex stuff is maybe 25%; as the
- problems grow larger, it looks like it becomes insignificant.
-
- Forth SHOULD allow programmers to optimize the IMPORTANT parts
- ("bottlenecks"). Unfortunately, it makes optimizations so
- easy/obvious that I've always found it hard to actually get code to
- WORK.
-
- I'm not sure that Forth NEEDS to be the fastest executing language;
- people have been able to live with the problems of Lisp garbage
- collection, and still swear by Lisp.
-
- Forth DOES need to make it possible to go fast; the typical built-in
- assembler allows this quite eminently.
-
- --
- Christopher Browne
- cbbrowne@csi.uottawa.ca
- University of Ottawa
- Master of System Science Program
-