Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #29653

Re: Forth vs Java in calculating partial sum ;)

From Melzzzzz <mel@zzzzz.invalid>
Newsgroups comp.lang.forth
Subject Re: Forth vs Java in calculating partial sum ;)
Date 2014-04-15 04:18 +0200
Organization None
Message-ID <lii4u9$p42$1@solani.org> (permalink)
References <libs3f$2r2$2@news.albasani.net> <7x7g6upizf.fsf@ruckus.brouhaha.com> <lihfkl$g58$5@news.albasani.net> <534c6c9c.421218876@news.demon.co.uk>

Show all headers | View raw


On Mon, 14 Apr 2014 23:20:57 GMT
stephenXXX@mpeforth.com (Stephen Pelc) wrote:

> On Mon, 14 Apr 2014 22:15:17 +0200, Melzzzzz <mel@zzzzz.com> wrote:
> 
> >> > bmaxa@maxa:~/examples/forth$ time gforth-fast -m 400M cumul.fs -e
> >> > bye ...
> >> > bmaxa@maxa:~/examples/forth$ time java Cumul ...
> >> 
> >> What, you're comparing a compiler against an interpreter (gforth)
> >> and saying the difference comes from division by constant
> >> optimization? Try comparing against iforth or vfx.
> >
> 
> >Then I tried vfxforth and it runs without installing
> >but it looks overly complicated to me to compile,
> >as it seems there is no command line option, rather
> >I have to write some code in order to compile?
> 
> RTFM. vfxforth treats the rest of the command line as Forth
> source code to interpret, e.g.
>   vfxlin  include cumul.fs
> 
> Stephen
> 

Thanks, I tweaked it to use (ticks) instead of utime and this
is result:
bmaxa@maxa:~/vfxforth/VfxLinEval/Bin$ time ./vfxlin include ../Lib/Ndp387.fth include /home/bmaxa/examples/forth/cumul.fs





 VFX Forth for Linux IA32
 © MicroProcessor Engineering Ltd, 1998-2013 

 Version: 4.62 [build 0522]
 Build date: 4 November 2013

 Free dictionary = 7900431 bytes [7715kb]


Including ../Lib/Ndp387.fth
Including /home/bmaxa/examples/forth/cumul.fs
238.09524 
555.55556 
262486571 

real	0m0.330s
user	0m0.313s
sys	0m0.016s


It is much faster than gforth but still slower than Java.

-- 
Click OK to continue...

Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Forth vs Java in calculating partial sum ;) Melzzzzz <mel@zzzzz.com> - 2014-04-12 19:11 +0200
  Re: Forth vs Java in calculating partial sum ;) Paul Rubin <no.email@nospam.invalid> - 2014-04-12 10:15 -0700
    Re: Forth vs Java in calculating partial sum ;) Melzzzzz <mel@zzzzz.com> - 2014-04-14 22:15 +0200
      Re: Forth vs Java in calculating partial sum ;) stephenXXX@mpeforth.com (Stephen Pelc) - 2014-04-14 23:20 +0000
        Re: Forth vs Java in calculating partial sum ;) Melzzzzz <mel@zzzzz.invalid> - 2014-04-15 04:18 +0200
          Re: Forth vs Java in calculating partial sum ;) m.a.m.hendrix@tue.nl - 2014-04-15 00:32 -0700
            Re: Forth vs Java in calculating partial sum ;) stephenXXX@mpeforth.com (Stephen Pelc) - 2014-04-15 11:33 +0000
            Re: Forth vs Java in calculating partial sum ;) Melzzzzz <mel@zzzzz.com> - 2014-04-15 15:55 +0200
          Re: Forth vs Java in calculating partial sum ;) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-04-15 14:44 +0000
            Re: Forth vs Java in calculating partial sum ;) Paul Rubin <no.email@nospam.invalid> - 2014-04-15 09:00 -0700
              Re: Forth vs Java in calculating partial sum ;) Melzzzzz <mel@zzzzz.invalid> - 2014-04-15 19:38 +0200
            Re: Forth vs Java in calculating partial sum ;) mhx@iae.nl - 2014-04-15 11:41 -0700
            Re: Forth vs Java in calculating partial sum ;) Melzzzzz <mel@zzzzz.com> - 2014-04-16 07:10 +0200
            Re: Forth vs Java in calculating partial sum ;) Melzzzzz <mel@zzzzz.com> - 2014-04-16 07:24 +0200
              Re: Forth vs Java in calculating partial sum ;) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-04-16 10:24 +0000
  Re: Forth vs Java in calculating partial sum ;) mhx@iae.nl - 2014-04-12 13:01 -0700
    Re: Forth vs Java in calculating partial sum ;) mhx@iae.nl - 2014-04-12 13:06 -0700
    Re: Forth vs Java in calculating partial sum ;) Paul Rubin <no.email@nospam.invalid> - 2014-04-12 15:49 -0700
      Re: Forth vs Java in calculating partial sum ;) mhx@iae.nl - 2014-04-12 23:00 -0700
        Re: Forth vs Java in calculating partial sum ;) Paul Rubin <no.email@nospam.invalid> - 2014-04-13 00:14 -0700
          Re: Forth vs Java in calculating partial sum ;) mhx@iae.nl - 2014-04-13 02:03 -0700
        Re: Forth vs Java in calculating partial sum ;) Bernd Paysan <bernd.paysan@gmx.de> - 2014-04-13 14:52 +0200
    Re: Forth vs Java in calculating partial sum ;) "WJ" <w_a_x_man@yahoo.com> - 2014-12-12 23:45 +0000
  Re: Forth vs Java in calculating partial sum ;) mhx@iae.nl - 2014-04-12 13:33 -0700
    Re: Forth vs Java in calculating partial sum ;) Bernd Paysan <bernd.paysan@gmx.de> - 2014-04-12 22:50 +0200
      Re: Forth vs Java in calculating partial sum ;) Melzzzzz <mel@zzzzz.invalid> - 2014-04-13 03:30 +0200
      Re: Forth vs Java in calculating partial sum ;) anton@mips.complang.tuwien.ac.at (Anton Ertl) - 2014-04-13 13:43 +0000
  Re: Forth vs Java in calculating partial sum ;) Andrew Haley <andrew29@littlepinkcloud.invalid> - 2014-04-15 10:05 -0500
  Re: Forth vs Java in calculating partial sum ;) "WJ" <w_a_x_man@yahoo.com> - 2014-12-05 05:46 +0000
  Re: Forth vs Java in calculating partial sum ;) "WJ" <w_a_x_man@yahoo.com> - 2014-12-10 09:50 +0000
    Re: Forth vs Java in calculating partial sum ;) "WJ" <w_a_x_man@yahoo.com> - 2014-12-10 18:29 +0000

csiph-web