Benchmark w/o using PL/I routine 
Author Message
 Benchmark w/o using PL/I routine

Hey, James Weinkam  (or anyone else interested)
You ever try to call assy routine from PL/I ?   Nows a chance to benchmark JUST the memory move speed
of your laptop using a routine NOT compiled by PL/I  and astound your fellow PLI'ers..

If you dont have MASM program, no problem, I just moved the 2 files needed to my site for a limited time,
so if you dont have assemble capability nows your chance to get it..
      http://www.*-*-*.com/
      http://www.*-*-*.com/

Below message posted this morning in comp.lang.fortran topic "CVF Subroutine twice as fast as Function"
may explain what I'm talking about..
I suggest changing the siz = 1000000 parameter to siz = 5000000 to get more stability in the timings,
and let us know how your laptop performs..  My 833mhz PC gets .450, .411 .411 seconds  for the 3 iterations if
I
use siz = 5000000

---------------------------------------------------------------

Quote:

> my 833Mhz PC produces following output
> -------------------------------------------
> subcopy(a,b,n)  sec=  0.090
> b=funcopy(a,n)  sec=  0.181

> Comments:  I would like to try a alternate subcopy using a MASM subroutine which sets up
> source,destination,count registers and executes a  REP MOVSD   instruction

Since no-one responded due to lack of interest (or more likely, due to lack of knowledge),
I delved into it and came up with below test which does NOT verify my assertion since the speed-up
is only 5%  with times switching between  0.080 and 0.090 sec
BTW,  I just  submitted a bug report because if I allow optimization of below test program,
CVF clobbers clock1 result when the test is enclosed within a do loop, (the move operation is not affected).
Anyone grasp what the problem is?  Will report back what vf-support has to say about this code ..
-----------------------------
program test
implicit none
integer,parameter :: siz=1000000
integer :: clock1, clock2, rate, iteration
real(8) :: a(siz), b(siz)
a = 1.
do iteration = 1,3                   ! 1st iteration sometimes runs 10-20% longer that subsequent iterations
   call system_clock(clock1,rate)
   call move(a,b,siz)
   call system_clock(clock2,rate)
   write (*,91) 'assy move(a,b,siz) sec= ',(clock2-clock1)/dble(rate)
end do
91 format (a,f0.3)
end program

below was assembled using

Quote:
>ML /c /coff move.asm     and linked with   >DF /nooptim test.f90 move.obj

----------------  MOVE.ASM FILE -----------------
; subroutine move(a,b,n)
; integer :: n
; real(8) :: a(n), b(n)
; b = a
; end subroutine

.486
.MODEL flat        ; below assy routine shud perform functionally
.CODE               ; equivalent to fortran code above


  sub     esp, 16
  push    ebx
  mov     esi, dword ptr 24[esp]   ; addr array a
  mov     edi, dword ptr 28[esp]   ; addr array b
  mov     ecx, dword ptr 32[esp]   ; addr integer n
  mov     ecx, dword ptr [ecx]     ; integer n
  shl     ecx, 1                   ; * 2 = #32bit words to move
  rep     movsd                    ; move a -> b
  pop     ebx
  add     esp, 16
  ret     12

END



Fri, 01 Jul 2005 20:41:58 GMT  
 Benchmark w/o using PL/I routine
Replace my previous version of move.asm with below which shud be more reliable.
Sooo, can Personal PL/I for Windows call a assy language routine written for the PC?
If not, why not?

; -----------------------move.asm -------------------------------
; subroutine move(a,b,n)
; integer :: n
; real(8) ;; a(n),b(n)
; b = a
; end subroutine

; below MASM code is equivalent to above Fortran subroutine

.486
.MODEL flat
.CODE


  sub     esp, 16
  push    ebx
  push    ecx
  push    edi
  push    esi
  mov     esi, dword ptr 36[esp]   ; get addr a
  mov     edi, dword ptr 40[esp]   ; get addr b
  mov     ecx, dword ptr 44[esp]  ; get addr n
  mov     ecx, dword ptr [ecx]      ; get n
  shl     ecx, 1                              ; *2 = #32bit words to move
  cld                                            ; clear direction flag (move forward)
  rep     movsd                            ; move a -> b
  pop     esi
  pop     edi
  pop     ecx
  pop     ebx
  add     esp, 16
  ret     12

END



Sat, 02 Jul 2005 14:30:05 GMT  
 Benchmark w/o using PL/I routine

Quote:

> You ever try to call assy routine from PL/I ?

PL/I has been able to call assembly routines since 1965.


Sat, 02 Jul 2005 20:55:39 GMT  
 Benchmark w/o using PL/I routine

Quote:


> > You ever try to call assy routine from PL/I ?

> PL/I has been able to call assembly routines since 1965.

Edify your PLI'er students Professor, by translating below benchmark, else we have to
file above statement as more "Robin speak"

------------- comp.lang.fortran topic "CVF Subroutine twice as fast as Function" ----------------

Quote:
> A more general comment: Your run times are too low, given the timer resolution
> of 10 ms, to allow a reasonable comparison of different solutions. You need
> run times in the range of ten seconds or more.

> Jan

Ok, advice taken, when below revised benchmark is run on my 833mhz PC,
it produces following timing results output:   800mb  assy sec = 8.40  fort sec = 8.67

program test
implicit none
integer,parameter :: siz=1000000
integer :: clock1, clock2, rate, iteration
real(8) :: a(siz), b(siz), time1, time2
a = 1.
call system_clock(clock1,rate)
do iteration = 1,100
   call move(a,b,siz)
end do
call system_clock(clock2,rate)
time1 = (clock2-clock1)/dble(rate)

call system_clock(clock1,rate)
do iteration = 1,100
   call subcopy(a,b,siz)
end do
call system_clock(clock2,rate)
time2 = (clock2-clock1)/dble(rate)

write (*,'(2(a,f0.2))') '800mb   assy sec= ',time1, ' fort sec= ', time2
end program



Sat, 02 Jul 2005 22:08:34 GMT  
 Benchmark w/o using PL/I routine

Quote:



>>>You ever try to call assy routine from PL/I ?

>>PL/I has been able to call assembly routines since 1965.

Sure did, and a special purpose TimeSharing system was written in PLI
that year with only a minor assist from assembler.
The same code was moved to other environments in the mid 70's, and only
the assembler routine had to be changed.
 Why?  The operating systems only supported calls to the "network
services" via assembler language macros.

--- and on another note: ---

"Colleges don't offer Fortran training because the language has a rep
for being easy to pick up on your own."

The correct statement is that colleges don't offer Fortran because 1)
There is only a minimal call for Fortran programmers
so there is no money providing the training, and 2) there aren't very
many current professors that know it well enough to teach it. COBOL
(ugh) is a mainstay in corporate programming, but that also is not
taught "very well" or "often enough" either.  PL/I also suffers from the
same syndrome, as did many, many other computer languages.

And the real reason is COST.  It's too damn expense for a college or
university to provide students with a zillion workstations with access
to almost any of the real production languages...   ..so new students
get "exposed" to C, C++, HTML, JAVA and PERL because those can be
obtained "FREE"!

Regardless of what certain people say, PL/I is still one of the best
high level langauges - both for prototyping and for full production. But
as has been said many times before - No One langauge is perfect for all
uses...

/soapbox off/

/s/ Bill Turner, wb4alm



Mon, 04 Jul 2005 06:06:39 GMT  
 Benchmark w/o using PL/I routine
On Wed, 15 Jan 2003 22:06:39 GMT, "Bill Turner, WB4ALM"

Quote:

>Regardless of what certain people say, PL/I is still one of the best
>high level langauges - both for prototyping and for full production.

...and: if you ar fluent in PL/1 you (almost by default) know REXX.
And vice-versa. of course.

The biggest problem I face going baack to PL/1 after a dozen years of
writing combat REXX is remembering to put semicolons at the end of the
statements.



Mon, 04 Jul 2005 06:51:48 GMT  
 Benchmark w/o using PL/I routine



Quote:




Quote:



Weinkam  (or anyone else interested)

Quote:

> >>>You ever try to call assy routine from PL/I ?

> >>PL/I has been able to call assembly routines since 1965.

> Sure did, and a special purpose TimeSharing system was written in
PLI
> that year with only a minor assist from assembler.

As the changed topic indicates, we were focusing on the ONLY PL/I
thats
effectively available for Windows. (VA's $3000 price makes it NOT
AVAIL
for discussing as a home desktop language choice)..  Weinkam's fishy
results using his Personal PL/I can be verified if someone would
assemble
my MOVE.ASM routine and then write a PL/I program to call it, but so
far
no-one has shown that Personal PL/I can link to it, (and I have made
avail
a copy of MASM at my site so that it can be adjusted for name change,
etc.)


Mon, 04 Jul 2005 14:23:29 GMT  
 Benchmark w/o using PL/I routine


Quote:
>....and: if you ar fluent in PL/1 you (almost by default) know REXX.
>And vice-versa. of course.

There are some {*filter*}y traps in there. There are things that look
similar but are radically different.

--
     Shmuel (Seymour J.) Metz, SysProg and JOAT

Any unsolicited commercial junk E-mail will be subject to legal
action.  I reserve the right to publicly post or ridicule any
abusive E-mail.

I mangled my E-mail address to foil automated spammers; reply to
domain Patriot dot net user shmuel+news to contact me.  Do not



Fri, 08 Jul 2005 02:14:07 GMT  
 Benchmark w/o using PL/I routine

Quote:







>  Weinkam  (or anyone else interested)

> > >>>You ever try to call assy routine from PL/I ?

> > >>PL/I has been able to call assembly routines since 1965.

> > Sure did, and a special purpose TimeSharing system was written in
>  PLI
> > that year with only a minor assist from assembler.

> As the changed topic indicates, we were focusing on the ONLY PL/I
> thats
> effectively available for Windows. (VA's $3000 price makes it NOT
> AVAIL
> for discussing as a home desktop language choice)..  Weinkam's fishy
> results using his Personal PL/I can be verified if someone would
> assemble
> my MOVE.ASM routine and then write a PL/I program to call it, but so
> far
> no-one has shown that Personal PL/I can link to it, (and I have made
> avail
> a copy of MASM at my site so that it can be adjusted for name change,
> etc.)

To answer the question in the subject: Yes, of course it can.
If you're having trouble getting it to work, show exactly how you're trying to
do it.  Lots of people will be able to point to the error.

Paul Cardinale



Sat, 09 Jul 2005 23:27:52 GMT  
 Benchmark w/o using PL/I routine


Quote:
> etc.)

> To answer the question in the subject: Yes, of course it can.
> If you're having trouble getting it to work, show exactly how you're
trying to
> do it.  Lots of people will be able to point to the error.

> Paul Cardinale

I have already posted my Fortran benchmark showing it calling a
move.asm routine, with runtimes for my 833mhz PC.
If you have Personal PL/I why not show the gurus here how to assemble
a PL/I compatible move.asm -> windows compatible move.obj and link it
with a PL/I benchmark timing test?
Its obvious this is too much for James Weinkam or Robin to handle.
If no-one succeeds then we must chalk up one more item pointing to
failure of IBM to provide Personal PL/I with Windows support.


Sat, 09 Jul 2005 23:55:28 GMT  
 Benchmark w/o using PL/I routine
I'm sure David isn't having problems.  I doubt if he's even looked at a
manual, much less tried to write a program.

Quote:



 > > >>>You ever try to call assy routine from PL/I ?
Quote:

> To answer the question in the subject: Yes, of course it can.
> If you're having trouble getting it to work, show exactly how you're trying to
> do it.  Lots of people will be able to point to the error.



Sun, 10 Jul 2005 06:14:53 GMT  
 Benchmark w/o using PL/I routine

Quote:



> > etc.)

> > To answer the question in the subject: Yes, of course it can.
> > If you're having trouble getting it to work, show exactly how you're
>  trying to
> > do it.  Lots of people will be able to point to the error.

> > Paul Cardinale

> I have already posted my Fortran benchmark showing it calling a
> move.asm routine, with runtimes for my 833mhz PC.
> If you have Personal PL/I why not show the gurus here how to assemble
> a PL/I compatible move.asm -> windows compatible move.obj and link it
> with a PL/I benchmark timing test?
> Its obvious this is too much for James Weinkam or Robin to handle.
> If no-one succeeds then we must chalk up one more item pointing to
> failure of IBM to provide Personal PL/I with Windows support.

It appears that you want code to run a benchmark, but are unwilling to
attempt the coding yourself.  How much are you willing to pay for
someone else to do it for you?

Paul Cardinale



Sun, 10 Jul 2005 06:18:42 GMT  
 
 [ 15 post ] 

 Relevant Pages 

1. fft routine (was Re: m88000 benchmarks)

2. Dinamyc PL/I routines with parametre problems in Language Environment

3. Using Prime calc. as benchmark

4. Using Primes calculation as benchmark

5. Using Prime calc. as benchmark

6. Using Primes calculation as benchmark

7. Problem using f2c on SPEC benchmarks

8. Input/output routines in Visual J3 using forms

9. Using routines in ABC-methods

10. Print routine delay using Pagescript

11. Using non-Clarion routines

12. VA PL/I using a C++ DLL

 

 
Powered by phpBB® Forum Software