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: Why is GFor...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 8 of 30 Topic 4030 of 4160
Post > Topic >>

Re: Why is GForth-ITC fast?

by Robert Spykerman <robert.spykerman@[EMAIL PROTECTED] > May 1, 2008 at 04:43 AM

On May 1, 7:00 pm, stephen...@[EMAIL PROTECTED]
 (Stephen Pelc) wrote:
> On Wed, 30 Apr 2008 19:30:05 -0700 (PDT), brian....@[EMAIL PROTECTED]
 wrote:
> >I have been dis-assembling pieces of GForth and I don't understand why
> >it is generally faster than other ITC Forths that are written in
> >Assembler like CI-Forth or my old 16 bit HS/Forth.  The Assembler
> >primitives seem to be so much smaller from what I can see.  Is the C
> >compiler smarter than we are?
>
> 1) Instruction selection
> 2) Instruction scheduling
>
> The performance coding rules for modern CPUs are not what you
> would expect, because instructions are split into micro-ops.
> PUSH and POP are particularly bad in many cases. See the Intel
> and AMD optimisation manuals for the horribly gory details.

Wow, that bit I hadn't realized.

So that's another thing to try, subtract and load to mem instead of
push. Would that be faster? Or just swap the stack into EBP like you
did, Stephen? I got to see what the c compilers do.

I was wondering why linus was stuffing parameters in registers to make
linux syscalls, instead of pu****ng to the stack. I must ask a linux
kernel hacker.

Compilers are extremely good these days, better than me for sure,
Brian - when I do get a chance I do enjoy seeing what they come up
with. It's a great way to learn assembly, watching what they spit out.
Intel C for linux is free, and one would imagine they would know their
chips best, and those manuals above are also free to download.

If you're particularly impatient and don't want to do c, VFX is also
very very very interesting to watch.

(For the record, I have to declare a particularly strong bias towards
this forth, so caveat emptor. I'm a happy customer - I know a lot of
compilers are free but speaking freely, this is one of the best darn
things I've spent money on).

By the way Stephen, if I may ask:

1. When is the release linux version anticipated to be ready?
2. Are you going to eventually go AMD64/EM64T given the extra no. of
registers and instructions?
3. I'm not too bothered about an OS X version - only really messing
with OS X because my wife has a mac, are there any plans this
direction?

> Stephen
>
> --
> Stephen Pelc, stephen...@[EMAIL PROTECTED]
> MicroProcessor Engineering Ltd - More Real, Less Time
> 133 Hill Lane, Southampton SO15 5AF, England
> tel: +44 (0)23 8063 1441, fax: +44 (0)23 8033 9691
> web:http://www.mpeforth.com-
free VFX Forth downloads

Robert Spykerman
 




 30 Posts in Topic:
Why is GForth-ITC fast?
brian.fox@[EMAIL PROTECTE  2008-04-30 19:30:05 
Re: Why is GForth-ITC fast?
"winston19842005@[EM  2008-04-30 21:29:44 
Re: Why is GForth-ITC fast?
Robert Spykerman <robe  2008-05-01 01:42:28 
Re: Why is GForth-ITC fast?
anton@[EMAIL PROTECTED]   2008-05-01 10:54:45 
Re: Why is GForth-ITC fast?
Albert van der Horst <  2008-05-01 17:26:57 
Re: Why is GForth-ITC fast?
stephenXXX@[EMAIL PROTECT  2008-05-01 22:22:50 
Re: Why is GForth-ITC fast?
stephenXXX@[EMAIL PROTECT  2008-05-01 09:00:18 
Re: Why is GForth-ITC fast?
Robert Spykerman <robe  2008-05-01 04:43:05 
Re: Why is GForth-ITC fast?
Thomas Pornin <pornin@  2008-05-01 12:45:38 
Re: Why is GForth-ITC fast?
stephenXXX@[EMAIL PROTECT  2008-05-01 12:56:26 
Re: Why is GForth-ITC fast?
Andrew Haley <andrew29  2008-05-01 11:41:05 
Re: Why is GForth-ITC fast?
anton@[EMAIL PROTECTED]   2008-05-01 18:22:56 
Re: Why is GForth-ITC fast?
Bernd Paysan <bernd.pa  2008-05-01 22:01:54 
Re: Why is GForth-ITC fast?
stephenXXX@[EMAIL PROTECT  2008-05-01 22:45:04 
Re: Why is GForth-ITC fast?
Thomas Pornin <pornin@  2008-05-01 23:44:26 
Re: Why is GForth-ITC fast?
Andrew Haley <andrew29  2008-05-02 04:27:59 
Re: Why is GForth-ITC fast?
Thomas Pornin <pornin@  2008-05-01 12:31:12 
Re: Why is GForth-ITC fast?
Albert van der Horst <  2008-05-01 16:33:12 
Re: Why is GForth-ITC fast?
brian.fox@[EMAIL PROTECTE  2008-05-01 17:12:16 
Re: Why is GForth-ITC fast?
mhx@[EMAIL PROTECTED] (M  2008-05-02 02:53:47 
Re: Why is GForth-ITC fast?
brian.fox@[EMAIL PROTECTE  2008-05-01 19:44:40 
Re: Why is GForth-ITC fast?
brian.fox@[EMAIL PROTECTE  2008-05-01 17:16:42 
Re: Why is GForth-ITC fast?
Robert Spykerman <robe  2008-05-01 20:17:47 
Re: Why is GForth-ITC fast?
Robert Spykerman <robe  2008-05-01 21:06:05 
Re: Why is GForth-ITC fast?
Thomas Pornin <pornin@  2008-05-02 13:00:46 
Re: Why is GForth-ITC fast?
Albert van der Horst <  2008-05-02 16:46:32 
Re: Why is GForth-ITC fast?
Thomas Pornin <pornin@  2008-05-02 18:11:41 
Re: Why is GForth-ITC fast?
Robert Spykerman <robe  2008-05-02 06:12:42 
Re: Why is GForth-ITC fast?
Robert Spykerman <robe  2008-05-02 17:40:35 
Re: Why is GForth-ITC fast?
Albert van der Horst <  2008-05-03 10:12:44 

Post A Reply:
  Go here to Signup

AddThis Feed Button


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

Contact
tan12V112 Fri Jul 18 20:43:34 CDT 2008.