Re: Another PL/I cant
From: David Frank (dave_frank_at_hotmail.com)
Date: 08/28/04
- Previous message: glen herrmannsfeldt: "Re: Numeric leak"
- In reply to: jan van oosterwijk: "Re: Another PL/I cant"
- Next in thread: jan van oosterwijk: "Re: Another PL/I cant"
- Reply: jan van oosterwijk: "Re: Another PL/I cant"
- Reply: James Giles: "Re: Another PL/I cant"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 28 Aug 2004 07:13:53 GMT
"jan van oosterwijk" <jvo_36@hotmail.com> wrote in message
news:8bb02cd6.0408271157.20faf97d@posting.google.com...
> "David Frank" <dave_frank@hotmail.com> wrote in message
> news:<uZlWc.51492$wM.42598@twister.tampabay.rr.com>...
>> "Mark Yudkin" <myudkinATcompuserveDOTcom@nospam.org> wrote in message
>> news:cgc170$pee$1@ngspool-d02.news.aol.com...
>> >
>> > Robin already posted a solution that was approximately 100 times faster
>> >
> [ .. ]
> If you want to prove anything at all.. at least stick to standard Fortran.
>
[ .. ] becomes standard Fortran any time now, (almost certainly this
year)
>> Statement 1 using a READ takes 1.8 sec when 2,3 are commented out
>> Statement 2 using a FORALL takes 0.5 sec when 1,3 are "
>> Statement 3 using a TRANSFER takes 2.1 sec when 1,2 are "
>
>> program hex_to_string ! benchmarking
>> character(48) :: hex = '414D51204D5153443120202020202020CE361F4120007711'
>> character(24) :: string
>> integer :: digit(48:70) = [0,1,2,3,4,5,6,7,8,9,0,0,0,0,0,0,0, &
>> 10,11,12,13,14,15]
> ! Standard is (/ ... /)
[ .. ] becomes standard Fortran any time now, but use (/ .. /) if your
compiler
doesnt have this F2003 syntax now. My CVF compiler does and its MANY
advanced
features allows me to rub noses (like yours?) in their stupid compiler
choices
(like Salford) quite regularly.
>> integer :: t1(8), t2(8)
>>
>> call date_and_time( values = t1)
>> do n = 1,100000
>>
>> ! Statement 1
>> read (hex,'(<len(string)>z2)') (string(i:i),i=1,len(string))
>
> ! 1. Non standard format < .. >
One of the VAX extensions that predates the current standard by many years
and is supported by leading compilers, but not by a compiler choice made by
ignorant Fortran losers.
BUT for those whose Fortran compiler doesnt have this support, statement 1
can be rewritten with no meaningful loss of operation.
read (hex,'(999Z2)') (string(i:i),i=1,len(string))
> ! 2. Z format only for integers
>
> [JvO]
>
Z format can be used to format integer,real,character variables.
- Previous message: glen herrmannsfeldt: "Re: Numeric leak"
- In reply to: jan van oosterwijk: "Re: Another PL/I cant"
- Next in thread: jan van oosterwijk: "Re: Another PL/I cant"
- Reply: jan van oosterwijk: "Re: Another PL/I cant"
- Reply: James Giles: "Re: Another PL/I cant"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|