A good compilers does, e.g., flow analysis, to optimize the generated code. It 
may be difficult to hand optimize well enough to beat a good compiler and still 
keep the code readable.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3

________________________________________
From: IBM Mainframe Discussion List [[email protected]] on behalf of 
Colin Paice [[email protected]]
Sent: Thursday, March 2, 2023 2:52 AM
To: [email protected]
Subject: Re: Mainframe REXX (Re: Badmouthing Rexx and ooRexx - again (Re: zOSMF 
and zOWE for non-mainframers

I think it is horses for courses.  Someone once said to me something along
the lines of ..

If you run it once a day write it in rexx (or Python)
If you run it once an hour - write it in Java
If you run it once a second write it in C
If you run it 1000 times a second - write it in Assembler.

It is not just a matter of performance - how much of your time do you want
to invest in writing the program.  The more time you spend - the better it
should be.
If it is good enough - is that OK ?
Colin

On Thu, 2 Mar 2023 at 04:25, David Crayford <[email protected]> wrote:

> After struggling with NetRexx, I've found that it could benefit from
> being as user-friendly as Kotlin or Groovy if the maintainers want to
> attract more users. On my machine, NetRexx is slower than Python but
> still respectable.
>
> However, both Python and NetRexx are outperformed by highly optimized
> Java solutions. Go is also impressive and available on z/OS using the
> IBM SDK.
>
> It's important to note that NetRexx is not ooRexx, and the discussion
> was focused on the poor performance of ooRexx. While some may choose to
> bridge NetRexx with Java, I personally find it more convenient to use
> Kotlin or Groovy instead.
>
>
> ❯ python3 PrimePy.py
> Passes: 6699, Time: 5.000532913953066, Avg: 0.0007464596079941881,
> Limit: 1000000, Count: 78498, Valid: True
> emillynge_numpy; 6699;5.000532913953066;1;algorithm=base,faithful=no,bits=8
>
> ❯ java -cp ~/NetRexx-4.04-GA/lib/NetRexxF.jar:. PrimeNetRexx
> joss_NetRexx;5743;5.000354;1;algorithm=base,bits=8,faithful=yes
>
> Optimized Java
>
> ❯ ./runSolution.sh
> chrvanorleI32;6197;5.000000;1;algorithm=base,faithful=yes,bits=1
> chrvanorleI32;19191;5.003000;4;algorithm=base,faithful=yes,bits=1
> chrvanorleI32C;7511;5.000000;1;algorithm=base,faithful=yes,bits=1
> chrvanorleI32C;21451;5.003000;4;algorithm=base,faithful=yes,bits=1
> chrvanorleI64;5957;5.000000;1;algorithm=base,faithful=yes,bits=1
> chrvanorleI64;18471;5.015000;4;algorithm=base,faithful=yes,bits=1
> chrvanorleI64C;7161;5.000000;1;algorithm=base,faithful=yes,bits=1
> chrvanorleI64C;21167;5.006000;4;algorithm=base,faithful=yes,bits=1
>
> chrvanorleI64PatternCalc;9308;5.000000;1;algorithm=other,faithful=yes,bits=1
>
> chrvanorleI64PatternCalc;29123;5.004000;4;algorithm=other,faithful=yes,bits=1
> chrvanorleI8;4946;5.000000;1;algorithm=base,faithful=yes,bits=1
> chrvanorleI8;14963;5.016000;4;algorithm=base,faithful=yes,bits=1
> chrvanorleI32CUnroll;7927;5.000000;1;algorithm=base,faithful=yes,bits=1
> chrvanorleI32CUnroll;25650;5.006000;4;algorithm=base,faithful=yes,bits=1
>
> chrvanorleStrided32Blocks16k;12069;5.000000;1;algorithm=base,faithful=yes,bits=1
>
> chrvanorleStrided32Blocks16k;37190;5.009000;4;algorithm=base,faithful=yes,bits=1
>
> ❯ go run .
> Run for 5.0 seconds using 12 workers to builing a sieve up to 1000000...
> Passes: 19506, Time: 5000 ms, Avg: 256336 ns/op, Limit: 1000000, Count1:
> 78498, Count2: 78498, Valid: true
> kpym-go-multi;19506;5.000096;4;algorithm=base,faithful=yes
>
>
> On 2/3/23 00:54, René Jansen wrote:
> > so this should work for you:
> >
> > ➜  test git:(master) ✗ cat hello.nrx
> > import java.lang.String
> >
> > say 'hello java' System.getProperty("java.version")
> >
> > loop i=long 0 to 10
> >       hello(i)
> > end
> >
> > loop i=long 0 to 10
> >       hello(java.lang.String(i))
> > end
> >
> > method hello(j)
> >    say "hello" j
> >
> >    method hello(j=long)
> >      say "hello long" j
> >
> >    method hello(j=java.lang.String)
> >      say "hello String" j
> > ➜  test git:(master) ✗ unset CLASSPATH
> > ➜  test git:(master) ✗ echo $CLASSPATH
> >
> > ➜  test git:(master) ✗ java -jar NetRexxC.jar hello
> > NetRexx portable processor 4.05-beta build 374-20230213-1052
> > Copyright (c) RexxLA, 2011,2023.   All rights reserved.
> > Parts Copyright (c) IBM Corporation, 1995,2008.
> > Program hello.nrx
> >      constructor hello(Rexx)
> >      constructor hello(long)
> >      constructor hello(String)
> > Compilation of 'hello.nrx' successful
> > ➜  test git:(master) ✗
> >
> > I have a global CLASSPATH, and only for specific projects I have a -cp
> on the command line for Make or Ninja, to have control over versions and
> libraries.
> > A global classpath enables me to check if all code is still compatible
> with the combination of releases from different libraries I use.
> > But as you see it is not really needed. We are not mandating anything,
> and if you want to run from a jar, that is fine.
> >
> > best regards,
> >
> > René.
> >
> >> On 1 Mar 2023, at 17:23, David Crayford<[email protected]>  wrote:
> >>
> >> On 2/3/23 00:20, René Jansen wrote:
> >>> Well, it *is* an executable jar. Up to you.
> >> Executable Jars don't require setting a CLASSPATH Rene
> >>
> >>
> >>>> On 1 Mar 2023, at 17:17, David Crayford<[email protected]>  wrote:
> >>>>
> >>>> Why doesn't it just use an executable jar and use "-jar"?
> >>> ----------------------------------------------------------------------
> >>> For IBM-MAIN subscribe / signoff / archive access instructions,
> >>> send email [email protected]  with the message: INFO IBM-MAIN
> >> ----------------------------------------------------------------------
> >> For IBM-MAIN subscribe / signoff / archive access instructions,
> >> send email [email protected]  with the message: INFO IBM-MAIN
> > ----------------------------------------------------------------------
> > For IBM-MAIN subscribe / signoff / archive access instructions,
> > send email [email protected]  with the message: INFO IBM-MAIN
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
>

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to