Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Forth > Re: I found a F...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 32 of 53 Topic 3681 of 4284
Post > Topic >>

Re: I found a FORTH stack optimzer, but could use a better version.

by foxchip <fox@[EMAIL PROTECTED] > Jan 6, 2008 at 08:54 AM

On Jan 6, 3:09 am, "Rod Pemberton" <do_not_h...@[EMAIL PROTECTED]
> wrote:
> "Marcel Hendrix" <m...@[EMAIL PROTECTED]
> wrote in message
>
> news:38331417223559@[EMAIL PROTECTED]
>
> > There is Fifth STACK
>
> From an old post of yours, it's supposedly on taygeta, but it FIFTH was
a
> commercial FORTH...  No, there seem to be many FORTH's named FIFTH. 
Another
> old post of yours indicates it is by Click.  And, a recent post by Steve
> Graham has a link to it and a linke to an ED article on
tuwien:http://groups.google.com/group/comp.lang.forth/msg/5f24ad2cd06e6e14?h...
>
> And, it's in bld.fiv in FIFTH.ZIP from an ancient no longer mirrored
Simtel
> directory which has some other archived FORTH's from '84 to
'93:http://files.chatnfiles.com/Simtel/DISC2/FORTH/
>
> And, I've got no idea what he's doing in STACK in bld.fiv...
>
> There is also this post of FIFTH's STACK word in
x86(?):http://groups.google.com/group/comp.lang.forth/msg/d917a7dc989b8c1c?h...
>
> Anyway, the second one has far to much for a tight, compact mapping onto
> x86...
>
> I thought taygeta stopped archiving stuff around '98...  Hmm, I guess
not:http://www.taygeta.com/forth.html
>
> > and this one:http://www.paul.de/downloadables/index.htm.
>
> reorder.seq or reorder.f
>
> ...reorders stack elements...
>
> > The search engine at Quartus net is pertty good for this:
>
> http://www.quartus.net/search/
>
> All those seem to reorder the stack in FORTH, I'm interested in
something
> which rewrites FORTH words in terms of other FORTH words, especially
words
> which operate on the stack.  I've basically exhausted what their program
can
> do, but when I realized that it had a problem with generating sequences
> using low valued PICK and ROLL's, I was hoping for something better.

Yes. That's bad. It is like painting yourself into a corner instead of
planning
to finish painting the floor at the exit.

The problem with some code generators is that they can generate some
nonsense sequences.  Some compilers attempt to patch this with
optimization
of compiled code sequences.  Simple peephole optimizers are often used
to
patch badly generated code this way.

The biggest problem I see with this is that people look for examples
of
the most badly generated nonsense code and hold it up in public as
examples of Forth that need optimization. It gives some people the
impression that sane Forth programmers write that sort of code in the
first place.

ThisForth actually modified the source recursively substituting one
string
for another to do this sort of code generation and code optimization
at
the source level before generating runtime code.  That's probably one
reason it was always the slowest Forth whenever it was compared to
anything else.

There are many approaches to code optimization.  Algorithmic
substitution,
design optimization, source code optimization, optimizing native code
compilation, table or rule based compiled code optimization including
simple peephole optimization.

The general rule in Forth is that as time progresses time frames get
more expensive.  As we go from design to edit to compile to test to
runtime time frames time gets more expensive and it is better to
solve problems earlier than later.  For this reason the most effective
code optimization takes place at design time.

You write the most optimal code you can. You let a lot of experts
look at it and optimize it in ways you didn't see and you may
optimize it again yourself.  This makes the compiler work easier.

If you write nonsense code or if your compiler generates nonsense
code then all the work past the design phase if expanded.

Best Wishes
 




 53 Posts in Topic:
I found a FORTH stack optimzer, but could use a better version.
"Rod Pemberton"  2008-01-06 00:26:01 
Re: I found a FORTH stack optimzer, but could use a better versi
mhx@[EMAIL PROTECTED] (M  2008-01-06 09:22:17 
Re: I found a FORTH stack optimzer, but could use a better versi
"Rod Pemberton"  2008-01-06 04:37:47 
Re: I found a FORTH stack optimzer, but could use a better versi
mhx@[EMAIL PROTECTED] (M  2008-01-06 11:00:53 
Re: I found a FORTH stack optimzer, but could use a better versi
"Rod Pemberton"  2008-01-06 06:10:48 
Re: I found a FORTH stack optimzer, but could use a better versi
"Rod Pemberton"  2008-01-06 06:24:17 
Re: I found a FORTH stack optimzer, but could use a better versi
mhx@[EMAIL PROTECTED] (M  2008-01-06 12:58:34 
Re: I found a FORTH stack optimzer, but could use a better versi
foxchip <fox@[EMAIL PR  2008-01-06 08:27:20 
Re: I found a FORTH stack optimzer, but could use a better versi
Coos Haak <chforth@[EM  2008-01-06 21:16:07 
Re: I found a FORTH stack optimzer, but could use a better versi
"Ed" <nospam  2008-01-07 17:51:08 
Re: I found a FORTH stack optimzer, but could use a better versi
Albert van der Horst <  2008-01-07 17:22:03 
Re: I found a FORTH stack optimzer, but could use a better versi
foxchip <fox@[EMAIL PR  2008-01-06 13:00:32 
Re: I found a FORTH stack optimzer, but could use a better versi
none <""jan\  2008-01-06 14:07:31 
Re: I found a FORTH stack optimzer, but could use a better versi
mhx@[EMAIL PROTECTED] (M  2008-01-06 15:27:04 
Re: I found a FORTH stack optimzer, but could use a better versi
foxchip <fox@[EMAIL PR  2008-01-06 08:32:53 
Re: I found a FORTH stack optimzer, but could use a better versi
foxchip <fox@[EMAIL PR  2008-01-06 08:05:30 
Re: I found a FORTH stack optimzer, but could use a better versi
stephenXXX@[EMAIL PROTECT  2008-01-06 13:42:55 
Re: I found a FORTH stack optimzer, but could use a better versi
"Rod Pemberton"  2008-01-06 06:09:25 
Re: I found a FORTH stack optimzer, but could use a better versi
stephenXXX@[EMAIL PROTECT  2008-01-06 13:46:06 
Re: I found a FORTH stack optimzer, but could use a better versi
"Rod Pemberton"  2008-01-06 18:25:08 
Re: I found a FORTH stack optimzer, but could use a better versi
stephenXXX@[EMAIL PROTECT  2008-01-07 10:58:44 
Re: I found a FORTH stack optimzer, but could use a better versi
"Rod Pemberton"  2008-01-07 21:39:25 
Re: I found a FORTH stack optimzer, but could use a better versi
"Rod Pemberton"  2008-01-07 22:57:58 
Re: I found a FORTH stack optimzer, but could use a better versi
Albert van der Horst <  2008-01-08 08:13:03 
Re: I found a FORTH stack optimzer, but could use a better versi
"Rod Pemberton"  2008-01-08 05:07:03 
Re: I found a FORTH stack optimzer, but could use a better versi
Albert van der Horst <  2008-01-08 18:26:32 
Re: I found a FORTH stack optimzer, but could use a better versi
Alex McDonald <blog@[E  2008-01-08 03:04:52 
Re: I found a FORTH stack optimzer, but could use a better versi
Roelf Toxopeus <these3  2008-01-06 15:24:29 
Re: I found a FORTH stack optimzer, but could use a better
winston19842005 <bjjly  2008-01-06 10:13:11 
Re: I found a FORTH stack optimzer, but could use a better versi
foxchip <fox@[EMAIL PR  2008-01-06 08:01:26 
Re: I found a FORTH stack optimzer, but could use a better versi
foxchip <fox@[EMAIL PR  2008-01-06 08:52:02 
Re: I found a FORTH stack optimzer, but could use a better versi
foxchip <fox@[EMAIL PR  2008-01-06 08:54:01 
Re: I found a FORTH stack optimzer, but could use a better versi
Bernd Paysan <bernd.pa  2008-01-06 18:34:43 
Re: I found a FORTH stack optimzer, but could use a better versi
helmwo@[EMAIL PROTECTED]   2008-01-06 10:27:48 
Re: I found a FORTH stack optimzer, but could use a better versi
foxchip <fox@[EMAIL PR  2008-01-06 13:26:05 
Re: I found a FORTH stack optimzer, but could use a better versi
Bernd Paysan <bernd.pa  2008-01-06 23:02:25 
Re: I found a FORTH stack optimzer, but could use a better versi
kenney@[EMAIL PROTECTED]   2008-01-07 09:47:13 
Re: I found a FORTH stack optimzer, but could use a better versi
foxchip <fox@[EMAIL PR  2008-01-06 13:43:00 
Re: I found a FORTH stack optimzer, but could use a better versi
Jenny Brien <jennybrie  2008-01-08 14:06:38 
Re: I found a FORTH stack optimzer, but could use a better versi
Bill <bill@[EMAIL PROT  2008-01-08 21:20:47 
Re: I found a FORTH stack optimzer, but could use a better versi
"Rod Pemberton"  2008-01-09 04:57:34 
Re: I found a FORTH stack optimzer, but could use a better versi
Jenny Brien <jennybrie  2008-01-10 09:50:29 
Re: I found a FORTH stack optimzer, but could use a better versi
"Rod Pemberton"  2008-01-11 03:34:02 
Re: I found a FORTH stack optimzer, but could use a better versi
"Jenny Brien" &  2008-01-11 17:49:07 
Re: I found a FORTH stack optimzer, but could use a better versi
"Rod Pemberton"  2008-01-12 04:31:21 
Re: I found a FORTH stack optimzer, but could use a better versi
astrobe <fdubois76@[EM  2008-01-14 09:31:33 
Re: I found a FORTH stack optimzer, but could use a better versi
foxchip <fox@[EMAIL PR  2008-01-19 10:11:10 
Re: I found a FORTH stack optimzer, but could use a better versi
stephenXXX@[EMAIL PROTECT  2008-01-20 15:33:32 
Re: I found a FORTH stack optimzer, but could use a better versi
ygrek <ygrek@[EMAIL PR  2008-01-06 12:31:47 
Re: I found a FORTH stack optimzer, but could use a better versi
"Rod Pemberton"  2008-01-06 17:58:45 
Re: I found a FORTH stack optimzer, but could use a better versi
anton@[EMAIL PROTECTED]   2008-01-06 18:22:00 
Re: I found a FORTH stack optimzer, but could use a better versi
"Rod Pemberton"  2008-01-06 18:18:56 
Re: I found a FORTH stack optimzer, but could use a better versi
ygrek <ygrek@[EMAIL PR  2008-01-07 09:05:18 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Oct 11 18:35:29 CDT 2008.