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 21 of 30 Topic 4030 of 4160
Post > Topic >>

Re: Why is GForth-ITC fast?

by brian.fox@[EMAIL PROTECTED] May 1, 2008 at 07:44 PM

On May 1, 8:53 pm, m...@[EMAIL PROTECTED]
 (Marcel Hendrix) wrote:
> brian....@[EMAIL PROTECTED]
 writes Re: Why is GForth-ITC fast?
> [..]
>
> > variable x
>
> \ Suggest:
> 1024 allot
>
>
>
>
>
> > : test!
> >      100 0 do
> >      30000 0 do
> >      \ 100 ! store ops
> >        i x !  i x !  i x !  i x !  i x !  i x !  i x !  i x !  i x ! 
i x !
> [..]
> >      loop
> >      loop ;
> > \ Benchmarks done on AMD Sempron 1.6 GHz, with 1 Gb RAM; Windows XP
SP2
> > \ Hs/Forth
> > \ elapse test!
> > \ Elapsed time =00:00:05.22 ok
> > \ Hs/Forth
> > \ elapse test!!
> > \ Elapsed time =00:00:05.22 ok
> > \  28% slower than GForth (below)
>
> These timings are ridiculous. Test! takes 180 ms on my PIV 3 GHz.
> Does it help if you add a gap between variable x and test! ?
>
> -marcel

It didn't make a difference.

Here is a screen cut and paste with another test where I replaced
all ! ops with 100 empty do loops.  Not sure how your machine is so
much faster!

Gforth 0.6.2, Copyright (C) 1995-2003 Free Software Foundation, Inc.
Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license'
Type `bye' to exit
include elapsed.fs  ok
include nexttest.fs  ok
  ok
elapse test!
Elapsed time: 00:00:03.880 ok
elapse test!
Elapsed time: 00:00:03.885 ok
elapse test!
Elapsed time: 00:00:03.882 ok
: testloop2  compiled
      100 0 do  compiled
        30000 0 do  compiled
  compiled
          100 0 do loop  compiled
  compiled
         loop  compiled
       loop ;  ok
elapse testloop2
Elapsed time: 00:00:01.743 ok

Brian
 




 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:33:50 CDT 2008.