Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Presidency: The greased pig in the field game of American politics. -- Ambrose Bierce


computers / comp.os.vms / Re: Python for x86?

SubjectAuthor
* Python for x86?Zane H. Healy
`* Re: Python for x86?Arne Vajhøj
 +* Re: Python for x86?Zane H. Healy
 |`* Re: Python for x86?Simon Clubley
 | +* Re: Python for x86?Craig A. Berry
 | |`* Re: Python for x86?Arne Vajhøj
 | | `* Re: Python for x86?Zane H. Healy
 | |  `* Re: Python for x86?Arne Vajhøj
 | |   `* Re: Python for x86?Craig A. Berry
 | |    +* Re: Python for x86?Neil Rieck
 | |    |+* Re: Python for x86?Arne Vajhøj
 | |    ||`* Re: Python for x86?Simon Clubley
 | |    || +- Re: Python for x86?Jan-Erik Söderholm
 | |    || +* Re: Python for x86?Arne Vajhøj
 | |    || |+- Re: Python for x86?Arne Vajhøj
 | |    || |`* Re: Python for x86?Jan-Erik Söderholm
 | |    || | `- Re: Python for x86?Arne Vajhøj
 | |    || `* Re: Python for x86?Arne Vajhøj
 | |    ||  +- Re: Python for x86?Arne Vajhøj
 | |    ||  `* Re: Python for x86?Simon Clubley
 | |    ||   `* Re: Python for x86?Arne Vajhøj
 | |    ||    +- Re: Python for x86?Arne Vajhøj
 | |    ||    `* Re: Python for x86?Simon Clubley
 | |    ||     `* Re: Python for x86?Arne Vajhøj
 | |    ||      +* Re: Python for x86?terry-...@glaver.org
 | |    ||      |`* Re: Python for x86?Chris Townley
 | |    ||      | `* Re: Python for x86?Arne Vajhøj
 | |    ||      |  +- Re: Python for x86?terry-...@glaver.org
 | |    ||      |  `* Re: Python for x86?Chris Townley
 | |    ||      |   +* Re: Python for x86?Dave Froble
 | |    ||      |   |`* Re: Python for x86?Chris Townley
 | |    ||      |   | +* Re: Python for x86?Arne Vajhøj
 | |    ||      |   | |+* Re: Python for x86?Chris Townley
 | |    ||      |   | ||`- Re: Python for x86?Arne Vajhøj
 | |    ||      |   | |`- Re: Python for x86?Dave Froble
 | |    ||      |   | +* Re: Python for x86?Dave Froble
 | |    ||      |   | |`- Re: Python for x86?Arne Vajhøj
 | |    ||      |   | `- Re: Python for x86?Johnny Billquist
 | |    ||      |   `* Re: Python for x86?Arne Vajhøj
 | |    ||      |    `* Re: Python for x86?Dave Froble
 | |    ||      |     `* Re: Python for x86?Chris Townley
 | |    ||      |      `* Re: Python for x86?Johnny Billquist
 | |    ||      |       `* Re: Python for x86?Arne Vajhøj
 | |    ||      |        +* Re: Python for x86?Chris Townley
 | |    ||      |        |`- Re: Python for x86?Dave Froble
 | |    ||      |        +* Re: Python for x86?Johnny Billquist
 | |    ||      |        |+- Re: Python for x86?Chris Townley
 | |    ||      |        |`- Re: Python for x86?Arne Vajhøj
 | |    ||      |        `- Re: Python for x86?Dave Froble
 | |    ||      `* Re: Python for x86?Arne Vajhøj
 | |    ||       `- Re: Python for x86?Arne Vajhøj
 | |    |+- Re: Python for x86?Arne Vajhøj
 | |    |+* Re: Python for x86?Jan-Erik Söderholm
 | |    ||`- Re: Python for x86?Arne Vajhøj
 | |    |`- Re: Python for x86?Jan-Erik Söderholm
 | |    `* Re: Python for x86?Arne Vajhøj
 | |     +* Re: Python for x86?Jan-Erik Söderholm
 | |     |`* Re: Python for x86?Arne Vajhøj
 | |     | `- Re: Python for x86?Single Stage to Orbit
 | |     `* Re: Python for x86?Simon Clubley
 | |      +* Re: Python for x86?Craig A. Berry
 | |      |+* Re: Python for x86?Simon Clubley
 | |      ||`* Re: Python for x86?bill
 | |      || `* Re: Python for x86?Simon Clubley
 | |      ||  +* Re: Python for x86?bill
 | |      ||  |+- Re: Python for x86?Jan-Erik Söderholm
 | |      ||  |+* Re: Python for x86?Dave Froble
 | |      ||  ||+- Re: Python for x86?Jan-Erik Söderholm
 | |      ||  ||`* Re: Python for x86?Arne Vajhøj
 | |      ||  || `* Re: Python for x86?Dave Froble
 | |      ||  ||  +* Re: Python for x86?Arne Vajhøj
 | |      ||  ||  |+* Re: Python for x86?Simon Clubley
 | |      ||  ||  ||`- Re: Python for x86?Dave Froble
 | |      ||  ||  |`- Re: Python for x86?Dave Froble
 | |      ||  ||  `- Re: Python for x86?Simon Clubley
 | |      ||  |+* Re: Python for x86?Simon Clubley
 | |      ||  ||`- Re: Python for x86?Arne Vajhøj
 | |      ||  |`- Re: Python for x86?Arne Vajhøj
 | |      ||  `* Re: Python for x86?Scott Dorsey
 | |      ||   +* Re: Python for x86?Arne Vajhøj
 | |      ||   |+* Re: Python for x86?Dave Froble
 | |      ||   ||`- Re: Python for x86?Arne Vajhøj
 | |      ||   |`* Re: Python for x86?Scott Dorsey
 | |      ||   | `- Re: Python for x86?Arne Vajhøj
 | |      ||   `* Re: Python for x86?Dave Froble
 | |      ||    `* Re: Python for x86?Arne Vajhøj
 | |      ||     `- Re: Python for x86?Dave Froble
 | |      |`- Re: Python for x86?Arne Vajhøj
 | |      `* Re: Python for x86?Arne Vajhøj
 | |       `* Re: Python for x86?Arne Vajhøj
 | |        `* Re: Python for x86?Craig A. Berry
 | |         `* Re: Python for x86?Arne Vajhøj
 | |          +- Re: Python for x86?Craig A. Berry
 | |          `* Re: Python for x86?Chris Townley
 | |           `* Re: Python for x86?Arne Vajhøj
 | |            +* Re: Python for x86?Scott Dorsey
 | |            |+* Re: Python for x86?Arne Vajhøj
 | |            ||`* Re: Python for x86?Scott Dorsey
 | |            || `- Re: Python for x86?Arne Vajhøj
 | |            |`* Re: Python for x86?Andreas Eder
 | |            | `* Re: Python for x86?bill
 | |            +* Re: Python for x86?Simon Clubley
 | |            `- Re: Python for x86?Andreas Eder
 | `* Re: Python for x86?ultr...@gmail.com
 `* Re: Python for x86?Robert A. Brooks

Pages:123456
Re: Python for x86?

<u2tvid$1b6sh$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=27895&group=comp.os.vms#27895

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: arn...@vajhoej.dk (Arne Vajhøj)
Newsgroups: comp.os.vms
Subject: Re: Python for x86?
Date: Wed, 3 May 2023 11:45:15 -0400
Organization: A noiseless patient Spider
Lines: 71
Message-ID: <u2tvid$1b6sh$1@dont-email.me>
References: <u0ru0r$19slj$1@dont-email.me> <u0ruro$19v81$1@dont-email.me>
<u0s4ib$1aon4$1@dont-email.me> <u13n0r$2kv9o$3@dont-email.me>
<u14ntj$2nojo$1@dont-email.me> <u14q4e$2ntau$1@dont-email.me>
<u16ipp$32rgs$1@dont-email.me> <u16mnr$33egq$1@dont-email.me>
<u17n2e$7qsg$1@dont-email.me>
<14c151fb-d512-4d0e-b39f-d36b97c0eb45n@googlegroups.com>
<u18rm8$e6k4$1@dont-email.me> <u18sdn$ee1g$1@dont-email.me>
<u2piec$dfub$1@dont-email.me> <u2rh5u$rfvp$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 3 May 2023 15:45:17 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="d5c9de1e52bb71ea6ac41aa94fe54f90";
logging-data="1416081"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18ztUzGWScutGe8lQSne4QcVRcpnZoCao4="
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.10.1
Cancel-Lock: sha1:fSc2F8XNj0cheBnMOaJhNg0uSfo=
In-Reply-To: <u2rh5u$rfvp$1@dont-email.me>
Content-Language: en-US
 by: Arne Vajhøj - Wed, 3 May 2023 15:45 UTC

On 5/2/2023 1:27 PM, Simon Clubley wrote:
> On 2023-05-01, Arne Vajhøj <arne@vajhoej.dk> wrote:
>> String operations (*)
>> Alpha sim Itanium
>> (no JIT) (older)
>> C 0.076 1.94
>> Pascal 0.005 0.32
>> Fortran 0.002 0.07
>> Basic 0.039 1.31
>> Ada (gnat make) 0.005 -
>> Ada (gnat make -gnatp "-O3") 0.005 -
>> Java 5 0.033 -
>> Java 8 - 1.76
>> Python 2 0.005 -
>> Python 3 - 0.65
>>
>> *) string operations are done "natural", which means that they are done
>> different in different languages.

> std::string would be interesting here if you have access to a C++ compiler.

C++ on Alpha simulator gives 0.005.

> What string operations are you performing ? Is it simple concatenation or
> something else ? The number of concatenations versus the size of each
> concatenation could also make a difference, at least for the dynamically
> allocated strings.

It is concatanations and substring operations.

VMS Pascal version:

const
ALFA = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
VMS_FACTOR = 100;

procedure teststr(scale : integer);

var
i, j, nstrscale, ix, ix1, ix2 : integer;
s, buf : string;
t1, t2 : Cardinal;

begin
nstrscale := NSTR div scale;
t1 := Clock;
for i := 1 to nstrscale * VMS_FACTOR do begin
buf := '';
for j := 1 to ((N div VMS_FACTOR) div 10) do begin
s := ALFA + ALFA;
ix := (i - 1 + 10 * (j - 1)) mod length(ALFA);
buf := buf + substr(s, ix + 1, 1) + substr(s, ix + 2, 2) +
substr(s, ix + 4, 3) + substr(s, ix + 7, 4);
end;
ix1 := (N div VMS_FACTOR) div 3;
ix2 := 2 * (N div VMS_FACTOR) div 3;
if (length(buf) <> (N div VMS_FACTOR)) or
(buf[ix1] <> ALFA[((i - 1 + ix1 - 1) mod length(ALFA)) + 1]) or
(buf[ix2] <> ALFA[((i - 1 + ix2 - 1) mod length(ALFA)) + 1])
then begin
writeln('String test error');
halt;
end;
end;
t2 := Clock;
printres(t1, t2, nstrscale, N div 10, 'string operations');
end;

Arne

Re: Python for x86?

<u2u2vb$1c1ip$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=27897&group=comp.os.vms#27897

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: arn...@vajhoej.dk (Arne Vajhøj)
Newsgroups: comp.os.vms
Subject: Re: Python for x86?
Date: Wed, 3 May 2023 12:43:22 -0400
Organization: A noiseless patient Spider
Lines: 34
Message-ID: <u2u2vb$1c1ip$1@dont-email.me>
References: <u0ru0r$19slj$1@dont-email.me> <u0ruro$19v81$1@dont-email.me>
<u0s4ib$1aon4$1@dont-email.me> <u13n0r$2kv9o$3@dont-email.me>
<u14ntj$2nojo$1@dont-email.me> <u14q4e$2ntau$1@dont-email.me>
<u16ipp$32rgs$1@dont-email.me> <u16mnr$33egq$1@dont-email.me>
<u17n2e$7qsg$1@dont-email.me>
<14c151fb-d512-4d0e-b39f-d36b97c0eb45n@googlegroups.com>
<u18rm8$e6k4$1@dont-email.me> <u18sdn$ee1g$1@dont-email.me>
<u2piec$dfub$1@dont-email.me> <u2rh5u$rfvp$1@dont-email.me>
<u2tvid$1b6sh$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 3 May 2023 16:43:23 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="d5c9de1e52bb71ea6ac41aa94fe54f90";
logging-data="1443417"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX185cmxkjv2h4mv1gZ40XrD5dHPC+b6I+K8="
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.10.1
Cancel-Lock: sha1:4Ccq3gBldNamMbLewe2Dhlz+7Qw=
In-Reply-To: <u2tvid$1b6sh$1@dont-email.me>
Content-Language: en-US
 by: Arne Vajhøj - Wed, 3 May 2023 16:43 UTC

On 5/3/2023 11:45 AM, Arne Vajhøj wrote:
> On 5/2/2023 1:27 PM, Simon Clubley wrote:
>> std::string would be interesting here if you have access to a C++
>> compiler.
>
> C++ on Alpha simulator gives 0.005.

Note that is with an inner loop of:

for(int j = 0; j < N / VMS_FACTOR; j = j + 10)
{
s = ALFA + ALFA;
int ix = (i + j) % ALFA.length();
buf.append(s, ix, 1);
buf.append(s, ix + 1, 2);
buf.append(s, ix + 3, 3);
buf.append(s, ix + 6, 4);
}

not:

for(int j = 0; j < N / VMS_FACTOR; j = j + 10)
{
s = ALFA + ALFA;
int ix = (i + j) % ALFA.length();
buf = buf + s.substr(ix, 1) + s.substr(ix + 1, 2) +
s.substr(ix + 3, 3) + s.substr(ix + 6, 4);
}

That ones gives 0.004 - and without the VMS_FACTOR then that
one would totally die performance wise.

Arne

Re: Python for x86?

<u307pp$1qp67$2@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=27905&group=comp.os.vms#27905

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: club...@remove_me.eisner.decus.org-Earth.UFP (Simon Clubley)
Newsgroups: comp.os.vms
Subject: Re: Python for x86?
Date: Thu, 4 May 2023 12:18:01 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 15
Message-ID: <u307pp$1qp67$2@dont-email.me>
References: <u0ru0r$19slj$1@dont-email.me> <u0ruro$19v81$1@dont-email.me> <u0s4ib$1aon4$1@dont-email.me> <u13n0r$2kv9o$3@dont-email.me> <u14ntj$2nojo$1@dont-email.me> <u14q4e$2ntau$1@dont-email.me> <u16ipp$32rgs$1@dont-email.me> <u16mnr$33egq$1@dont-email.me> <u17n2e$7qsg$1@dont-email.me> <14c151fb-d512-4d0e-b39f-d36b97c0eb45n@googlegroups.com> <u18rm8$e6k4$1@dont-email.me> <u18sdn$ee1g$1@dont-email.me> <u2piec$dfub$1@dont-email.me> <u2rh5u$rfvp$1@dont-email.me> <u2tvid$1b6sh$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 4 May 2023 12:18:01 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="f7a2174c16574ce5f73499daab61659f";
logging-data="1926343"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18UfQY1ar62oWsJMbo48pv+eevleXI95XU="
User-Agent: slrn/0.9.8.1 (VMS/Multinet)
Cancel-Lock: sha1:XI4EO8ieiG8K4kH/ft1aTRMPIaI=
 by: Simon Clubley - Thu, 4 May 2023 12:18 UTC

On 2023-05-03, Arne Vajhøj <arne@vajhoej.dk> wrote:
> On 5/2/2023 1:27 PM, Simon Clubley wrote:
>
>> std::string would be interesting here if you have access to a C++ compiler.
>
> C++ on Alpha simulator gives 0.005.
>

Thanks. It's interesting seeing how various languages compare.

Simon.

--
Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP
Walking destinations on a map are further away than they appear.

Re: Python for x86?

<u38hgj$3e6ke$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=27945&group=comp.os.vms#27945

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: arn...@vajhoej.dk (Arne Vajhøj)
Newsgroups: comp.os.vms
Subject: Re: Python for x86?
Date: Sun, 7 May 2023 11:52:50 -0400
Organization: A noiseless patient Spider
Lines: 57
Message-ID: <u38hgj$3e6ke$1@dont-email.me>
References: <u0ru0r$19slj$1@dont-email.me> <u0ruro$19v81$1@dont-email.me>
<u0s4ib$1aon4$1@dont-email.me> <u13n0r$2kv9o$3@dont-email.me>
<u14ntj$2nojo$1@dont-email.me> <u14q4e$2ntau$1@dont-email.me>
<u16ipp$32rgs$1@dont-email.me> <u16mnr$33egq$1@dont-email.me>
<u17n2e$7qsg$1@dont-email.me>
<14c151fb-d512-4d0e-b39f-d36b97c0eb45n@googlegroups.com>
<u18rm8$e6k4$1@dont-email.me> <u18sdn$ee1g$1@dont-email.me>
<u2piec$dfub$1@dont-email.me> <u2rh5u$rfvp$1@dont-email.me>
<u2tvid$1b6sh$1@dont-email.me> <u307pp$1qp67$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 7 May 2023 15:52:51 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="326447e11074498fb688a58a8ed32dde";
logging-data="3611278"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19mHgFiRnw6TjzKqh8Ra8+b5u3TQRoAaqc="
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.10.1
Cancel-Lock: sha1:Ir47ATOi67KJ0khCxzFgJMZR/EY=
Content-Language: en-US
In-Reply-To: <u307pp$1qp67$2@dont-email.me>
 by: Arne Vajhøj - Sun, 7 May 2023 15:52 UTC

On 5/4/2023 8:18 AM, Simon Clubley wrote:
> On 2023-05-03, Arne Vajhøj <arne@vajhoej.dk> wrote:
>> On 5/2/2023 1:27 PM, Simon Clubley wrote:
>>
>>> std::string would be interesting here if you have access to a C++ compiler.
>>
>> C++ on Alpha simulator gives 0.005.
>>
>
> Thanks. It's interesting seeing how various languages compare.

Just realized that I had an error in the calculation for
string performance in Fortran and Basic (I fucked up with the
VMS_FACTOR constant that is used to keep string length under
32K).

So again with C++ and (hopefully) with Fortran and Basic
correct for string operations:

Integer operations
Alpha sim Itanium
(no JIT) (older)
C, C++, Pascal, Fortran 24-29 246
Basic 5 38
Ada (gnat make) 8 -
Ada (gnat make -gnatp "-O3") 44 -
Java 5 11 -
Java 8 - 286
Python 2 0.05 -
Python 3 - 0.6

String operations
Alpha sim Itanium
(no JIT) (older)
C 0.078 1.94
C++ 0.049 0.40
Pascal 0.005 0.32
Fortran 0.156 6.94
Basic 0.004 0.13
Ada (gnat make) 0.005 -
Ada (gnat make -gnatp "-O3") 0.005 -
Java 5 0.033 -
Java 8 - 1.76
Python 2 0.005 -
Python 3 - 0.065

Again the string numbers are not so much a reflection on
compiler efficiency but more a reflection on how string
operations are done "natural" in the language - static
vs dynamic etc..

If someone want to check themselves the sources are
available at https://www.vajhoej.dk/arne/temp/bm.zip !

Arne

Re: Python for x86?

<a434fe0c-7874-4459-a900-114d3ca77dabn@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=27950&group=comp.os.vms#27950

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:a05:622a:1a1a:b0:3e9:aa91:3600 with SMTP id f26-20020a05622a1a1a00b003e9aa913600mr4148507qtb.9.1683516638223;
Sun, 07 May 2023 20:30:38 -0700 (PDT)
X-Received: by 2002:a05:620a:2985:b0:74d:fdca:a6c6 with SMTP id
r5-20020a05620a298500b0074dfdcaa6c6mr3130537qkp.14.1683516637894; Sun, 07 May
2023 20:30:37 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!1.us.feeder.erje.net!feeder.erje.net!border-1.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Sun, 7 May 2023 20:30:37 -0700 (PDT)
In-Reply-To: <u38hgj$3e6ke$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=100.8.228.76; posting-account=2vnRtAoAAAAE0ap3uRDMDu6cngT6BrOO
NNTP-Posting-Host: 100.8.228.76
References: <u0ru0r$19slj$1@dont-email.me> <u0ruro$19v81$1@dont-email.me>
<u0s4ib$1aon4$1@dont-email.me> <u13n0r$2kv9o$3@dont-email.me>
<u14ntj$2nojo$1@dont-email.me> <u14q4e$2ntau$1@dont-email.me>
<u16ipp$32rgs$1@dont-email.me> <u16mnr$33egq$1@dont-email.me>
<u17n2e$7qsg$1@dont-email.me> <14c151fb-d512-4d0e-b39f-d36b97c0eb45n@googlegroups.com>
<u18rm8$e6k4$1@dont-email.me> <u18sdn$ee1g$1@dont-email.me>
<u2piec$dfub$1@dont-email.me> <u2rh5u$rfvp$1@dont-email.me>
<u2tvid$1b6sh$1@dont-email.me> <u307pp$1qp67$2@dont-email.me> <u38hgj$3e6ke$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <a434fe0c-7874-4459-a900-114d3ca77dabn@googlegroups.com>
Subject: Re: Python for x86?
From: terry-gr...@glaver.org (terry-...@glaver.org)
Injection-Date: Mon, 08 May 2023 03:30:38 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 41
 by: terry-...@glaver.org - Mon, 8 May 2023 03:30 UTC

On Sunday, May 7, 2023 at 11:55:00 AM UTC-4, Arne Vajhøj wrote:
> If someone want to check themselves the sources are
> available at https://www.vajhoej.dk/arne/temp/bm.zip !

Here's what I get on my emulated Alpha (AlphaVM-Pro 1.5.73 JIT3) on dual E5-2643 v3 CPUs (only the first result from each test run reported):
2_SERVER::$ @test.com
C:
337.8378 million integer operations per second
35.2113 million floating point operations per second
3.4483 million string operations per second
C:
342.4658 million integer operations per second
35.2113 million floating point operations per second
3.4483 million string operations per second
C++:
359.7122 million integer operations per second
35.2113 million floating point operations per second
0.1748 million string operations per second
Pascal:
357.1428 million integer operations per second
35.7143 million floating point operations per second
0.2174 million string operations per second
Fortran:
343.6426 million integer operations per second
35.3357 million floating point operations per second
7.6923 million string operations per second
Fortran:
344.8276 million integer operations per second
35.3357 million floating point operations per second
8.3333 million string operations per second
Basic:
24.6609 million integer operations per second
28.4091 million floating point operations per second
0.1416 million string operations per second
Basic:
24.5038 million integer operations per second
28.8184 million floating point operations per second
0.1408 million string operations per second
[No Ada, Java or Python installed.]

Re: Python for x86?

<u3am3d$3rehk$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=27956&group=comp.os.vms#27956

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: new...@cct-net.co.uk (Chris Townley)
Newsgroups: comp.os.vms
Subject: Re: Python for x86?
Date: Mon, 8 May 2023 12:23:24 +0100
Organization: A noiseless patient Spider
Lines: 47
Message-ID: <u3am3d$3rehk$1@dont-email.me>
References: <u0ru0r$19slj$1@dont-email.me> <u0ruro$19v81$1@dont-email.me>
<u0s4ib$1aon4$1@dont-email.me> <u13n0r$2kv9o$3@dont-email.me>
<u14ntj$2nojo$1@dont-email.me> <u14q4e$2ntau$1@dont-email.me>
<u16ipp$32rgs$1@dont-email.me> <u16mnr$33egq$1@dont-email.me>
<u17n2e$7qsg$1@dont-email.me>
<14c151fb-d512-4d0e-b39f-d36b97c0eb45n@googlegroups.com>
<u18rm8$e6k4$1@dont-email.me> <u18sdn$ee1g$1@dont-email.me>
<u2piec$dfub$1@dont-email.me> <u2rh5u$rfvp$1@dont-email.me>
<u2tvid$1b6sh$1@dont-email.me> <u307pp$1qp67$2@dont-email.me>
<u38hgj$3e6ke$1@dont-email.me>
<a434fe0c-7874-4459-a900-114d3ca77dabn@googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 8 May 2023 11:23:25 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="505220afb6f93f5c359176eadffa8afa";
logging-data="4045364"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/1mbIGErjvm03GOQNCj4kGPfc1Z6rzuro="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.10.1
Cancel-Lock: sha1:7qD9DHi11YW2hhzFyI1IryAFkME=
In-Reply-To: <a434fe0c-7874-4459-a900-114d3ca77dabn@googlegroups.com>
Content-Language: en-GB
 by: Chris Townley - Mon, 8 May 2023 11:23 UTC

On 08/05/2023 04:30, terry-...@glaver.org wrote:
> On Sunday, May 7, 2023 at 11:55:00 AM UTC-4, Arne Vajhøj wrote:
>> If someone want to check themselves the sources are
>> available at https://www.vajhoej.dk/arne/temp/bm.zip !
>
> Here's what I get on my emulated Alpha (AlphaVM-Pro 1.5.73 JIT3) on dual E5-2643 v3 CPUs (only the first result from each test run reported):
> 2_SERVER::$ @test.com
> C:
> 337.8378 million integer operations per second
> 35.2113 million floating point operations per second
> 3.4483 million string operations per second
> C:
> 342.4658 million integer operations per second
> 35.2113 million floating point operations per second
> 3.4483 million string operations per second
> C++:
> 359.7122 million integer operations per second
> 35.2113 million floating point operations per second
> 0.1748 million string operations per second
> Pascal:
> 357.1428 million integer operations per second
> 35.7143 million floating point operations per second
> 0.2174 million string operations per second
> Fortran:
> 343.6426 million integer operations per second
> 35.3357 million floating point operations per second
> 7.6923 million string operations per second
> Fortran:
> 344.8276 million integer operations per second
> 35.3357 million floating point operations per second
> 8.3333 million string operations per second
> Basic:
> 24.6609 million integer operations per second
> 28.4091 million floating point operations per second
> 0.1416 million string operations per second
> Basic:
> 24.5038 million integer operations per second
> 28.8184 million floating point operations per second
> 0.1408 million string operations per second
>
> [No Ada, Java or Python installed.]

Interesting that BASIC show integer as slower than FP

--
Chris

Re: Python for x86?

<u3b4qi$3tl6i$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=27966&group=comp.os.vms#27966

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: arn...@vajhoej.dk (Arne Vajhøj)
Newsgroups: comp.os.vms
Subject: Re: Python for x86?
Date: Mon, 8 May 2023 11:34:42 -0400
Organization: A noiseless patient Spider
Lines: 38
Message-ID: <u3b4qi$3tl6i$1@dont-email.me>
References: <u0ru0r$19slj$1@dont-email.me> <u0ruro$19v81$1@dont-email.me>
<u0s4ib$1aon4$1@dont-email.me> <u13n0r$2kv9o$3@dont-email.me>
<u14ntj$2nojo$1@dont-email.me> <u14q4e$2ntau$1@dont-email.me>
<u16ipp$32rgs$1@dont-email.me> <u16mnr$33egq$1@dont-email.me>
<u17n2e$7qsg$1@dont-email.me>
<14c151fb-d512-4d0e-b39f-d36b97c0eb45n@googlegroups.com>
<u18rm8$e6k4$1@dont-email.me> <u18sdn$ee1g$1@dont-email.me>
<u2piec$dfub$1@dont-email.me> <u2rh5u$rfvp$1@dont-email.me>
<u2tvid$1b6sh$1@dont-email.me> <u307pp$1qp67$2@dont-email.me>
<u38hgj$3e6ke$1@dont-email.me>
<a434fe0c-7874-4459-a900-114d3ca77dabn@googlegroups.com>
<u3am3d$3rehk$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Mon, 8 May 2023 15:34:42 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="a0cbaa63e7ca30b22c99d2ba43298cc8";
logging-data="4117714"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+n9BJhjZM+RiGfu5Yxs/3wWxl+rUg+0Z0="
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.10.1
Cancel-Lock: sha1:Y90TJWtozA/tzLtf8nGYm/R7LA4=
Content-Language: en-US
In-Reply-To: <u3am3d$3rehk$1@dont-email.me>
 by: Arne Vajhøj - Mon, 8 May 2023 15:34 UTC

On 5/8/2023 7:23 AM, Chris Townley wrote:
> On 08/05/2023 04:30, terry-...@glaver.org wrote:
>> On Sunday, May 7, 2023 at 11:55:00 AM UTC-4, Arne Vajhøj wrote:
>>> If someone want to check themselves the sources are
>>> available at https://www.vajhoej.dk/arne/temp/bm.zip !
>>
>> Here's what I get on my emulated Alpha (AlphaVM-Pro 1.5.73 JIT3) on
>> dual E5-2643 v3 CPUs (only the first result from each test run reported):
>> 2_SERVER::$ @test.com
>> C:
>> 337.8378 million integer operations per second
>> 35.2113 million floating point operations per second
>> 3.4483 million string operations per second

Amazing so fast Alpha sim with JIT is. It is more than
x10 without JIT.

>>   Basic:
>>    24.6609 million integer operations per second
>>    28.4091 million floating point operations per second

> Interesting that BASIC show integer as slower than FP

Yes. I was puzzled by that as well. But I got the same result
on my systems.

/NOCHECK does not change it so it is not the overflow
check.

Maybe there is some subtle error in the Basic integer
test code. But I cannot see it.

Or maybe it is just an example of how random results
can be with a very limited benchmark - the integer
result practically depends on a single line of code.

Arne

Re: Python for x86?

<4fda20f3-928d-4bcb-b070-b37de81bcb38n@googlegroups.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=27972&group=comp.os.vms#27972

  copy link   Newsgroups: comp.os.vms
X-Received: by 2002:a05:620a:31a6:b0:751:358d:1617 with SMTP id bi38-20020a05620a31a600b00751358d1617mr3588337qkb.3.1683583793229;
Mon, 08 May 2023 15:09:53 -0700 (PDT)
X-Received: by 2002:a05:620a:424d:b0:74d:33a7:1049 with SMTP id
w13-20020a05620a424d00b0074d33a71049mr4346330qko.14.1683583793058; Mon, 08
May 2023 15:09:53 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!feeder1.feed.usenet.farm!feed.usenet.farm!peer01.ams4!peer.am4.highwinds-media.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.os.vms
Date: Mon, 8 May 2023 15:09:52 -0700 (PDT)
In-Reply-To: <u3b4qi$3tl6i$1@dont-email.me>
Injection-Info: google-groups.googlegroups.com; posting-host=100.8.228.76; posting-account=2vnRtAoAAAAE0ap3uRDMDu6cngT6BrOO
NNTP-Posting-Host: 100.8.228.76
References: <u0ru0r$19slj$1@dont-email.me> <u0ruro$19v81$1@dont-email.me>
<u0s4ib$1aon4$1@dont-email.me> <u13n0r$2kv9o$3@dont-email.me>
<u14ntj$2nojo$1@dont-email.me> <u14q4e$2ntau$1@dont-email.me>
<u16ipp$32rgs$1@dont-email.me> <u16mnr$33egq$1@dont-email.me>
<u17n2e$7qsg$1@dont-email.me> <14c151fb-d512-4d0e-b39f-d36b97c0eb45n@googlegroups.com>
<u18rm8$e6k4$1@dont-email.me> <u18sdn$ee1g$1@dont-email.me>
<u2piec$dfub$1@dont-email.me> <u2rh5u$rfvp$1@dont-email.me>
<u2tvid$1b6sh$1@dont-email.me> <u307pp$1qp67$2@dont-email.me>
<u38hgj$3e6ke$1@dont-email.me> <a434fe0c-7874-4459-a900-114d3ca77dabn@googlegroups.com>
<u3am3d$3rehk$1@dont-email.me> <u3b4qi$3tl6i$1@dont-email.me>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <4fda20f3-928d-4bcb-b070-b37de81bcb38n@googlegroups.com>
Subject: Re: Python for x86?
From: terry-gr...@glaver.org (terry-...@glaver.org)
Injection-Date: Mon, 08 May 2023 22:09:53 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3116
 by: terry-...@glaver.org - Mon, 8 May 2023 22:09 UTC

On Monday, May 8, 2023 at 11:36:50 AM UTC-4, Arne Vajhøj wrote:
> Amazing so fast Alpha sim with JIT is. It is more than
> x10 without JIT.

Yes. I asked for a demo of AlphaVM-Pro after trying the (then-available) AlphaVM-Free. I evaluated it under Windows, but I couldn't deal with Windows updates, reboots, etc. killing the VM. So I asked for a quote for a port to FreeBSD (the Linux version of AlphaVM-Pro had enough Linuxisms in it that it wouldn't run under FreeBSD's Linux emulation). We eventually roped in a couple of FreeBSD developers to deal with some gnarly issues, both "how do I do this on FreeBSD" as well as to fix some interesting bugs in seldom-used FreeBSD code*. I've been running it for over 10 years now and have been extremely satisfied with it. I know the author has sold other licenses for the FreeBSD version as well.

* For example, a bug introduced in the FreeBSD SCSI passthru code in the 9.x timeframe caused a $ BACKUP/VERIFY to a physical tape to report a bogus I/O error after doing the rewind and starting the verify pass. VMS drivers do some odd things with SCSI, probably due to the historical differences between "DEC SCSI", "Apple SCSI" and "Regular SCSI".

Re: Lisp alternatives for Emacs [was Re: Python for x86?]

<871qjqi2wp.fsf@yahoo.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=27979&group=comp.os.vms#27979

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: luang...@yahoo.com (Po Lu)
Newsgroups: comp.os.vms
Subject: Re: Lisp alternatives for Emacs [was Re: Python for x86?]
Date: Tue, 09 May 2023 11:45:10 +0800
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <871qjqi2wp.fsf@yahoo.com>
References: <u0ru0r$19slj$1@dont-email.me> <u1u37j$1u0uq$2@dont-email.me>
<u20kg3$3977v$1@dont-email.me> <u213nm$lhm$1@panix2.panix.com>
<97e01fbf-5036-43c2-94a0-ab27145c0398n@googlegroups.com>
<u21qoh$3fiks$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: dont-email.me; posting-host="4351004aab832e129ea41edf5fd48011";
logging-data="187723"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+/YmaeeiRk2L2NPiFvKf2yNFu4u8Om1Ck="
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:J0ciTbdVrjXQWPjCZC4gQlVrbwQ=
sha1:/3UMFtVlpn7gDr5vA9tV2eEGeZk=
 by: Po Lu - Tue, 9 May 2023 03:45 UTC

Arne Vajhøj <arne@vajhoej.dk> writes:

> My point was that if someone took the 28.2 source and
> put back all the #ifdef vms code from 21.2 then what would
> be missing? How much of the new stuff added would require
> new #ifdef vms code?
>
> I don't think I have played with GNU Emacs since VMS VAX
> days (early 90's) and I have no idea about what has been added
> to GNU Emacs the last few decades, but I am sort of guessing
> that the new stuff would be most "edit stuff" and not
> so much "system interface stuff". Of course I could
> be totally wrong.

Indeed. The only major change is that compared to 21.1, Emacs now uses
much more of Gnulib to provide OS specific code. Adding back the VMS
code should still be straightforward, but moving much of it into Gnulib
would be even better.

Re: Python for x86?

<u3e7et$82mc$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=27999&group=comp.os.vms#27999

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: new...@cct-net.co.uk (Chris Townley)
Newsgroups: comp.os.vms
Subject: Re: Python for x86?
Date: Tue, 9 May 2023 20:38:05 +0100
Organization: A noiseless patient Spider
Lines: 49
Message-ID: <u3e7et$82mc$1@dont-email.me>
References: <u0ru0r$19slj$1@dont-email.me> <u0ruro$19v81$1@dont-email.me>
<u0s4ib$1aon4$1@dont-email.me> <u13n0r$2kv9o$3@dont-email.me>
<u14ntj$2nojo$1@dont-email.me> <u14q4e$2ntau$1@dont-email.me>
<u16ipp$32rgs$1@dont-email.me> <u16mnr$33egq$1@dont-email.me>
<u17n2e$7qsg$1@dont-email.me>
<14c151fb-d512-4d0e-b39f-d36b97c0eb45n@googlegroups.com>
<u18rm8$e6k4$1@dont-email.me> <u18sdn$ee1g$1@dont-email.me>
<u2piec$dfub$1@dont-email.me> <u2rh5u$rfvp$1@dont-email.me>
<u2tvid$1b6sh$1@dont-email.me> <u307pp$1qp67$2@dont-email.me>
<u38hgj$3e6ke$1@dont-email.me>
<a434fe0c-7874-4459-a900-114d3ca77dabn@googlegroups.com>
<u3am3d$3rehk$1@dont-email.me> <u3b4qi$3tl6i$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 9 May 2023 19:38:05 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="3dc889e3b67859b0d4424a3edbc71b2a";
logging-data="264908"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX181wDNYqunKp9gW3YtNMnSNqvado+Rv4L8="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.10.1
Cancel-Lock: sha1:KudNDozekcy5mnk5Ull6Z96hEqY=
Content-Language: en-GB
In-Reply-To: <u3b4qi$3tl6i$1@dont-email.me>
 by: Chris Townley - Tue, 9 May 2023 19:38 UTC

On 08/05/2023 16:34, Arne Vajhøj wrote:
> On 5/8/2023 7:23 AM, Chris Townley wrote:
>> On 08/05/2023 04:30, terry-...@glaver.org wrote:
>

>>>   Basic:
>>>    24.6609 million integer operations per second
>>>    28.4091 million floating point operations per second
>
>> Interesting that BASIC show integer as slower than FP
>
> Yes. I was puzzled by that as well. But I got the same result
> on my systems.
>
> /NOCHECK does not change it so it is not the overflow
> check.
>
> Maybe there is some subtle error in the Basic integer
> test code. But I cannot see it.
>
> Or maybe it is just an example of how random results
> can be with a very limited benchmark - the integer
> result practically depends on a single line of code.
>
> Arne
>

Finally got round to testing my thoughts.

On my FreeAXP (no JIT) setup I get the following with your code:

Basic:
12.3182 million integer operations per second
14.1572 million floating point operations per second
0.0080 million string operations per second

I then changed the integer bits to append the % to all integer
constants, and now get:

Basic:
31.6586 million integer operations per second

It shows how BASIC can be slowed down not doing that!

--
Chris

Re: Python for x86?

<u3ehn0$d2jk$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=28003&group=comp.os.vms#28003

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dav...@tsoft-inc.com (Dave Froble)
Newsgroups: comp.os.vms
Subject: Re: Python for x86?
Date: Tue, 9 May 2023 18:32:44 -0400
Organization: A noiseless patient Spider
Lines: 63
Message-ID: <u3ehn0$d2jk$1@dont-email.me>
References: <u0ru0r$19slj$1@dont-email.me> <u0ruro$19v81$1@dont-email.me>
<u0s4ib$1aon4$1@dont-email.me> <u13n0r$2kv9o$3@dont-email.me>
<u14ntj$2nojo$1@dont-email.me> <u14q4e$2ntau$1@dont-email.me>
<u16ipp$32rgs$1@dont-email.me> <u16mnr$33egq$1@dont-email.me>
<u17n2e$7qsg$1@dont-email.me>
<14c151fb-d512-4d0e-b39f-d36b97c0eb45n@googlegroups.com>
<u18rm8$e6k4$1@dont-email.me> <u18sdn$ee1g$1@dont-email.me>
<u2piec$dfub$1@dont-email.me> <u2rh5u$rfvp$1@dont-email.me>
<u2tvid$1b6sh$1@dont-email.me> <u307pp$1qp67$2@dont-email.me>
<u38hgj$3e6ke$1@dont-email.me>
<a434fe0c-7874-4459-a900-114d3ca77dabn@googlegroups.com>
<u3am3d$3rehk$1@dont-email.me> <u3b4qi$3tl6i$1@dont-email.me>
<u3e7et$82mc$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 9 May 2023 22:33:04 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="6eb67fd7c17c1458f51d1312f9a690f8";
logging-data="428660"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/NSUNu0yJvpSWBwmQHqotrMp0UMk/VKr0="
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:mKhbaUV9aXJTDV07n+WCw3ly/Zc=
In-Reply-To: <u3e7et$82mc$1@dont-email.me>
 by: Dave Froble - Tue, 9 May 2023 22:32 UTC

On 5/9/2023 3:38 PM, Chris Townley wrote:
> On 08/05/2023 16:34, Arne Vajhøj wrote:
>> On 5/8/2023 7:23 AM, Chris Townley wrote:
>>> On 08/05/2023 04:30, terry-...@glaver.org wrote:
>>
>
>
>>>> Basic:
>>>> 24.6609 million integer operations per second
>>>> 28.4091 million floating point operations per second
>>
>>> Interesting that BASIC show integer as slower than FP
>>
>> Yes. I was puzzled by that as well. But I got the same result
>> on my systems.
>>
>> /NOCHECK does not change it so it is not the overflow
>> check.
>>
>> Maybe there is some subtle error in the Basic integer
>> test code. But I cannot see it.
>>
>> Or maybe it is just an example of how random results
>> can be with a very limited benchmark - the integer
>> result practically depends on a single line of code.
>>
>> Arne
>>
>
> Finally got round to testing my thoughts.
>
> On my FreeAXP (no JIT) setup I get the following with your code:
>
> Basic:
> 12.3182 million integer operations per second
> 14.1572 million floating point operations per second
> 0.0080 million string operations per second
>
>
> I then changed the integer bits to append the % to all integer constants, and
> now get:
>
> Basic:
> 31.6586 million integer operations per second
>
> It shows how BASIC can be slowed down not doing that!
>

I haven't been following this closely, but, First guess is that the variables
were defaulted to floating point, and then perhaps an integer conversion happened?

Can you post the code?

Once past the compiler, the "%" and "$" signs don't matter, since the compiler
would assign the variables, if not declared, and it would just be data and
addresses/pointers afterwards.

--
David Froble Tel: 724-529-0450
Dave Froble Enterprises, Inc. E-Mail: davef@tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA 15486

Re: Python for x86?

<u3ei0l$81j8$2@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=28005&group=comp.os.vms#28005

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: new...@cct-net.co.uk (Chris Townley)
Newsgroups: comp.os.vms
Subject: Re: Python for x86?
Date: Tue, 9 May 2023 23:38:12 +0100
Organization: A noiseless patient Spider
Lines: 122
Message-ID: <u3ei0l$81j8$2@dont-email.me>
References: <u0ru0r$19slj$1@dont-email.me> <u0ruro$19v81$1@dont-email.me>
<u0s4ib$1aon4$1@dont-email.me> <u13n0r$2kv9o$3@dont-email.me>
<u14ntj$2nojo$1@dont-email.me> <u14q4e$2ntau$1@dont-email.me>
<u16ipp$32rgs$1@dont-email.me> <u16mnr$33egq$1@dont-email.me>
<u17n2e$7qsg$1@dont-email.me>
<14c151fb-d512-4d0e-b39f-d36b97c0eb45n@googlegroups.com>
<u18rm8$e6k4$1@dont-email.me> <u18sdn$ee1g$1@dont-email.me>
<u2piec$dfub$1@dont-email.me> <u2rh5u$rfvp$1@dont-email.me>
<u2tvid$1b6sh$1@dont-email.me> <u307pp$1qp67$2@dont-email.me>
<u38hgj$3e6ke$1@dont-email.me>
<a434fe0c-7874-4459-a900-114d3ca77dabn@googlegroups.com>
<u3am3d$3rehk$1@dont-email.me> <u3b4qi$3tl6i$1@dont-email.me>
<u3e7et$82mc$1@dont-email.me> <u3ehn0$d2jk$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 9 May 2023 22:38:13 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="d477a5bd91c28a763979012dc793fc3f";
logging-data="263784"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+S2c8+dTd2vUnOn+XBYRIGgUhhJX4sBlY="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.10.1
Cancel-Lock: sha1:120VEWwC80mriYhhBRcUdpvaUOE=
Content-Language: en-GB
In-Reply-To: <u3ehn0$d2jk$1@dont-email.me>
 by: Chris Townley - Tue, 9 May 2023 22:38 UTC

On 09/05/2023 23:32, Dave Froble wrote:
> On 5/9/2023 3:38 PM, Chris Townley wrote:
>> On 08/05/2023 16:34, Arne Vajhøj wrote:
>>> On 5/8/2023 7:23 AM, Chris Townley wrote:
>>>> On 08/05/2023 04:30, terry-...@glaver.org wrote:
>>>
>>
>>
>>>>>   Basic:
>>>>>    24.6609 million integer operations per second
>>>>>    28.4091 million floating point operations per second
>>>
>>>> Interesting that BASIC show integer as slower than FP
>>>
>>> Yes. I was puzzled by that as well. But I got the same result
>>> on my systems.
>>>
>>> /NOCHECK does not change it so it is not the overflow
>>> check.
>>>
>>> Maybe there is some subtle error in the Basic integer
>>> test code. But I cannot see it.
>>>
>>> Or maybe it is just an example of how random results
>>> can be with a very limited benchmark - the integer
>>> result practically depends on a single line of code.
>>>
>>> Arne
>>>
>>
>> Finally got round to testing my thoughts.
>>
>> On my FreeAXP (no JIT) setup I get the following with your code:
>>
>> Basic:
>>   12.3182 million integer operations per second
>>   14.1572 million floating point operations per second
>>    0.0080 million string operations per second
>>
>>
>> I then changed the integer bits to append the % to all integer
>> constants, and
>> now get:
>>
>> Basic:
>>   31.6586 million integer operations per second
>>
>> It shows how BASIC can be slowed down not doing that!
>>
>
> I haven't been following this closely, but, First guess is that the
> variables were defaulted to floating point, and then perhaps an integer
> conversion happened?
>
> Can you post the code?
>
> Once past the compiler, the "%" and "$" signs don't matter, since the
> compiler would assign the variables, if not declared, and it would just
> be data and addresses/pointers afterwards.
>

Arne posted a link to the code before, but the relevant bits are:

Arne's version:

sub testfp(integer xscale)

declare integer constant NFP = 1000
declare integer constant N = 1000000
declare integer i, j, nfpscale
declare double sum
declare quad t1, t2
external sub printres(quad, quad, integer, integer, string)

nfpscale = NFP / xscale
call sys$gettim(t1)
for i = 1 to nfpscale
sum = i - 1
for j = 1 to N
sum = ((sum + 1) * 2 + 1) / 2
next j
if abs(sum - (i - 1 + 1.5 * N)) > 1 then
print "Floating point test error"
stop
end if
next i
call sys$gettim(t2)
call printres(t1, t2, nfpscale, N, "floating point operations")

end sub

My changes:

sub testint(integer xscale)

declare integer constant NINT = 10000%
declare integer constant N = 1000000%
declare integer i, j, nintscale, sum
declare quad t1, t2
external sub printres(quad, quad, integer, integer, string)
external long function sys$gettim(quad)

nintscale = NINT / xscale
call sys$gettim(t1)
for i = 1% to nintscale
sum = i - 1%
for j = 1 to N
sum = ((sum + 1%) * 2% + 1%) / 2%
next j
if sum <> (i - 1% + N) then
print "Integer test error"
stop
end if
next i
call sys$gettim(t2)
call printres(t1, t2, nintscale, N, "integer operations")

end sub

--
Chris

Re: Python for x86?

<u3enrl$dlct$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=28012&group=comp.os.vms#28012

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: arn...@vajhoej.dk (Arne Vajhøj)
Newsgroups: comp.os.vms
Subject: Re: Python for x86?
Date: Tue, 9 May 2023 20:17:56 -0400
Organization: A noiseless patient Spider
Lines: 71
Message-ID: <u3enrl$dlct$1@dont-email.me>
References: <u0ru0r$19slj$1@dont-email.me> <u0ruro$19v81$1@dont-email.me>
<u0s4ib$1aon4$1@dont-email.me> <u13n0r$2kv9o$3@dont-email.me>
<u14ntj$2nojo$1@dont-email.me> <u14q4e$2ntau$1@dont-email.me>
<u16ipp$32rgs$1@dont-email.me> <u16mnr$33egq$1@dont-email.me>
<u17n2e$7qsg$1@dont-email.me>
<14c151fb-d512-4d0e-b39f-d36b97c0eb45n@googlegroups.com>
<u18rm8$e6k4$1@dont-email.me> <u18sdn$ee1g$1@dont-email.me>
<u2piec$dfub$1@dont-email.me> <u2rh5u$rfvp$1@dont-email.me>
<u2tvid$1b6sh$1@dont-email.me> <u307pp$1qp67$2@dont-email.me>
<u38hgj$3e6ke$1@dont-email.me>
<a434fe0c-7874-4459-a900-114d3ca77dabn@googlegroups.com>
<u3am3d$3rehk$1@dont-email.me> <u3b4qi$3tl6i$1@dont-email.me>
<u3e7et$82mc$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 10 May 2023 00:17:57 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c75883259f189a4a5a94bac03529d77e";
logging-data="447901"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/k4ysCknU3uz7OEpKYKuxjj7mSWhK9U1M="
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.10.1
Cancel-Lock: sha1:XmSJmRmxXGFfoj/O+Pi0gU3Myxs=
Content-Language: en-US
In-Reply-To: <u3e7et$82mc$1@dont-email.me>
 by: Arne Vajhøj - Wed, 10 May 2023 00:17 UTC

On 5/9/2023 3:38 PM, Chris Townley wrote:
> On 08/05/2023 16:34, Arne Vajhøj wrote:
>> On 5/8/2023 7:23 AM, Chris Townley wrote:
>>> Interesting that BASIC show integer as slower than FP
>>
>> Yes. I was puzzled by that as well. But I got the same result
>> on my systems.
>>
>> /NOCHECK does not change it so it is not the overflow
>> check.
>>
>> Maybe there is some subtle error in the Basic integer
>> test code. But I cannot see it.
>
> Finally got round to testing my thoughts.
>
> On my FreeAXP (no JIT) setup I get the following with your code:
>
> Basic:
>   12.3182 million integer operations per second
>   14.1572 million floating point operations per second
>    0.0080 million string operations per second
>
>
> I then changed the integer bits to append the % to all integer
> constants, and now get:
>
> Basic:
>   31.6586 million integer operations per second
>
> It shows how BASIC can be slowed down not doing that!

I can confirm that.

By changing 1 to 1% and 2 to 2% then the results are
way more as expected.

In fact BASIC is only about 25% slower than the
other native languages and BASIC/NOCHECK is
just as fast as the other native languages.

When one knows what to look for then it is
easy to find.

The VMS Basic Reference Manual says:

<quote>
An integer constant is a literal or named constant, either positive or
negative,
with no fractional digits and an optional trailing percent sign (%). The
percent
sign is required for integer literals only if the default type is not
INTEGER.
</quote>

And HELP BAS /TYPE says:

<quote>
The default is /TYPE_DEFAULT = REAL.
</quote>

so 1 and 2 are two real constants.

So my mistake.

I will have to rerun all the tests.

Arne

Re: Python for x86?

<u3eo19$dlct$2@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=28013&group=comp.os.vms#28013

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: arn...@vajhoej.dk (Arne Vajhøj)
Newsgroups: comp.os.vms
Subject: Re: Python for x86?
Date: Tue, 9 May 2023 20:20:56 -0400
Organization: A noiseless patient Spider
Lines: 43
Message-ID: <u3eo19$dlct$2@dont-email.me>
References: <u0ru0r$19slj$1@dont-email.me> <u0ruro$19v81$1@dont-email.me>
<u0s4ib$1aon4$1@dont-email.me> <u13n0r$2kv9o$3@dont-email.me>
<u14ntj$2nojo$1@dont-email.me> <u14q4e$2ntau$1@dont-email.me>
<u16ipp$32rgs$1@dont-email.me> <u16mnr$33egq$1@dont-email.me>
<u17n2e$7qsg$1@dont-email.me>
<14c151fb-d512-4d0e-b39f-d36b97c0eb45n@googlegroups.com>
<u18rm8$e6k4$1@dont-email.me> <u18sdn$ee1g$1@dont-email.me>
<u2piec$dfub$1@dont-email.me> <u2rh5u$rfvp$1@dont-email.me>
<u2tvid$1b6sh$1@dont-email.me> <u307pp$1qp67$2@dont-email.me>
<u38hgj$3e6ke$1@dont-email.me>
<a434fe0c-7874-4459-a900-114d3ca77dabn@googlegroups.com>
<u3am3d$3rehk$1@dont-email.me> <u3b4qi$3tl6i$1@dont-email.me>
<u3e7et$82mc$1@dont-email.me> <u3ehn0$d2jk$1@dont-email.me>
<u3ei0l$81j8$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 10 May 2023 00:20:57 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c75883259f189a4a5a94bac03529d77e";
logging-data="447901"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/cBM0V2cgBN0YUJDKjU3d4G9c0FUqiCuM="
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.10.1
Cancel-Lock: sha1:H6F2gip3Sx5gOGQUcNOHv940j+c=
In-Reply-To: <u3ei0l$81j8$2@dont-email.me>
Content-Language: en-US
 by: Arne Vajhøj - Wed, 10 May 2023 00:20 UTC

On 5/9/2023 6:38 PM, Chris Townley wrote:
> On 09/05/2023 23:32, Dave Froble wrote:
>> On 5/9/2023 3:38 PM, Chris Townley wrote:
>>> I then changed the integer bits to append the % to all integer
>>> constants, and
>>> now get:

>>> It shows how BASIC can be slowed down not doing that!
>>
>> I haven't been following this closely, but, First guess is that the
>> variables were defaulted to floating point, and then perhaps an
>> integer conversion happened?
>>
>> Can you post the code?
>>
>> Once past the compiler, the "%" and "$" signs don't matter, since the
>> compiler would assign the variables, if not declared, and it would
>> just be data and addresses/pointers afterwards.

> Arne posted a link to the code before, but the relevant bits are:
>
> Arne's version:
>
> sub testfp(integer xscale)

That was the FP sub.

> My changes:
>
> sub testint(integer xscale)

I think the only important change is from:

sum = ((sum + 1) * 2 + 1) / 2

to:

sum = ((sum + 1%) * 2% + 1%) / 2%

Arne

Re: Python for x86?

<u3eopp$82mc$2@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=28014&group=comp.os.vms#28014

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: new...@cct-net.co.uk (Chris Townley)
Newsgroups: comp.os.vms
Subject: Re: Python for x86?
Date: Wed, 10 May 2023 01:34:00 +0100
Organization: A noiseless patient Spider
Lines: 51
Message-ID: <u3eopp$82mc$2@dont-email.me>
References: <u0ru0r$19slj$1@dont-email.me> <u0ruro$19v81$1@dont-email.me>
<u0s4ib$1aon4$1@dont-email.me> <u13n0r$2kv9o$3@dont-email.me>
<u14ntj$2nojo$1@dont-email.me> <u14q4e$2ntau$1@dont-email.me>
<u16ipp$32rgs$1@dont-email.me> <u16mnr$33egq$1@dont-email.me>
<u17n2e$7qsg$1@dont-email.me>
<14c151fb-d512-4d0e-b39f-d36b97c0eb45n@googlegroups.com>
<u18rm8$e6k4$1@dont-email.me> <u18sdn$ee1g$1@dont-email.me>
<u2piec$dfub$1@dont-email.me> <u2rh5u$rfvp$1@dont-email.me>
<u2tvid$1b6sh$1@dont-email.me> <u307pp$1qp67$2@dont-email.me>
<u38hgj$3e6ke$1@dont-email.me>
<a434fe0c-7874-4459-a900-114d3ca77dabn@googlegroups.com>
<u3am3d$3rehk$1@dont-email.me> <u3b4qi$3tl6i$1@dont-email.me>
<u3e7et$82mc$1@dont-email.me> <u3ehn0$d2jk$1@dont-email.me>
<u3ei0l$81j8$2@dont-email.me> <u3eo19$dlct$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 10 May 2023 00:34:01 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="d477a5bd91c28a763979012dc793fc3f";
logging-data="264908"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18geVYS4mc6FuUPrTuGMh5d2kU9aR6Hcvw="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.10.1
Cancel-Lock: sha1:Wreq5VKD4bj5O7nk1geIjKTIRrY=
In-Reply-To: <u3eo19$dlct$2@dont-email.me>
Content-Language: en-GB
 by: Chris Townley - Wed, 10 May 2023 00:34 UTC

On 10/05/2023 01:20, Arne Vajhøj wrote:
> On 5/9/2023 6:38 PM, Chris Townley wrote:
>> On 09/05/2023 23:32, Dave Froble wrote:
>>> On 5/9/2023 3:38 PM, Chris Townley wrote:
>>>> I then changed the integer bits to append the % to all integer
>>>> constants, and
>>>> now get:
>
>>>> It shows how BASIC can be slowed down not doing that!
>>>
>>> I haven't been following this closely, but, First guess is that the
>>> variables were defaulted to floating point, and then perhaps an
>>> integer conversion happened?
>>>
>>> Can you post the code?
>>>
>>> Once past the compiler, the "%" and "$" signs don't matter, since the
>>> compiler would assign the variables, if not declared, and it would
>>> just be data and addresses/pointers afterwards.
>
>> Arne posted a link to the code before, but the relevant bits are:
>>
>> Arne's version:
>>
>> sub testfp(integer xscale)
>
> That was the FP sub.
>
>> My changes:
>>
>> sub testint(integer xscale)
>
> I think the only important change is from:
>
> sum = ((sum + 1) * 2 + 1) / 2
>
> to:
>
> sum = ((sum + 1%) * 2% + 1%) / 2%
>
> Arne
>

Correct - sorry - my bad cut and paste

Still at least we got to the bottom of it. Using the % sign was part of
our standards using VAX/DEC/Compaq/HP Basic

--
Chris

Re: Python for x86?

<u3et30$hnfp$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=28015&group=comp.os.vms#28015

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: arn...@vajhoej.dk (Arne Vajhøj)
Newsgroups: comp.os.vms
Subject: Re: Python for x86?
Date: Tue, 9 May 2023 21:47:11 -0400
Organization: A noiseless patient Spider
Lines: 50
Message-ID: <u3et30$hnfp$1@dont-email.me>
References: <u0ru0r$19slj$1@dont-email.me> <u0ruro$19v81$1@dont-email.me>
<u0s4ib$1aon4$1@dont-email.me> <u13n0r$2kv9o$3@dont-email.me>
<u14ntj$2nojo$1@dont-email.me> <u14q4e$2ntau$1@dont-email.me>
<u16ipp$32rgs$1@dont-email.me> <u16mnr$33egq$1@dont-email.me>
<u17n2e$7qsg$1@dont-email.me>
<14c151fb-d512-4d0e-b39f-d36b97c0eb45n@googlegroups.com>
<u18rm8$e6k4$1@dont-email.me> <u18sdn$ee1g$1@dont-email.me>
<u2piec$dfub$1@dont-email.me> <u2rh5u$rfvp$1@dont-email.me>
<u2tvid$1b6sh$1@dont-email.me> <u307pp$1qp67$2@dont-email.me>
<u38hgj$3e6ke$1@dont-email.me>
<a434fe0c-7874-4459-a900-114d3ca77dabn@googlegroups.com>
<u3am3d$3rehk$1@dont-email.me> <u3b4qi$3tl6i$1@dont-email.me>
<u3e7et$82mc$1@dont-email.me> <u3ehn0$d2jk$1@dont-email.me>
<u3ei0l$81j8$2@dont-email.me> <u3eo19$dlct$2@dont-email.me>
<u3eopp$82mc$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 10 May 2023 01:47:12 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c75883259f189a4a5a94bac03529d77e";
logging-data="581113"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/eEAqvYGtcfXR4kILe2/sWW9JDv5lccwQ="
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.10.1
Cancel-Lock: sha1:D5f8tuAt4uHUqgtLIHleiknMBYU=
Content-Language: en-US
In-Reply-To: <u3eopp$82mc$2@dont-email.me>
 by: Arne Vajhøj - Wed, 10 May 2023 01:47 UTC

On 5/9/2023 8:34 PM, Chris Townley wrote:
> Still at least we got to the bottom of it. Using the % sign was part of
> our standards using VAX/DEC/Compaq/HP Basic

And an example that one should not blindly assume that
all programming languages follow the same conventions
about literals.

I actually already knew about such an example.

It is very very common that a language supports 123.45f for
32 bit FP and 123.45d for 64 bit FP and the language got some
standard for whether 123.45 default to 32 or 64 bit FP (aka
has an implicit f or d suffix).

Java:

public class WhatFP {
public static void printType(Object o) {
System.out.println(o.getClass().getName());
}
public static void main(String[] args) {
printType(123.45f);
printType(123.45d);
printType(123.45);
}
}

outputs:

java.lang.Float
java.lang.Double
java.lang.Double

works that way.

So one gets surprised when working with Groovy:

println(123.45f.class.name)
println(123.45d.class.name)
println(123.45.class.name)

outputs:

java.lang.Float
java.lang.Double
java.math.BigDecimal

Arne

Re: Python for x86?

<u3f394$ig27$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=28018&group=comp.os.vms#28018

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dav...@tsoft-inc.com (Dave Froble)
Newsgroups: comp.os.vms
Subject: Re: Python for x86?
Date: Tue, 9 May 2023 23:32:31 -0400
Organization: A noiseless patient Spider
Lines: 144
Message-ID: <u3f394$ig27$1@dont-email.me>
References: <u0ru0r$19slj$1@dont-email.me> <u0ruro$19v81$1@dont-email.me>
<u0s4ib$1aon4$1@dont-email.me> <u13n0r$2kv9o$3@dont-email.me>
<u14ntj$2nojo$1@dont-email.me> <u14q4e$2ntau$1@dont-email.me>
<u16ipp$32rgs$1@dont-email.me> <u16mnr$33egq$1@dont-email.me>
<u17n2e$7qsg$1@dont-email.me>
<14c151fb-d512-4d0e-b39f-d36b97c0eb45n@googlegroups.com>
<u18rm8$e6k4$1@dont-email.me> <u18sdn$ee1g$1@dont-email.me>
<u2piec$dfub$1@dont-email.me> <u2rh5u$rfvp$1@dont-email.me>
<u2tvid$1b6sh$1@dont-email.me> <u307pp$1qp67$2@dont-email.me>
<u38hgj$3e6ke$1@dont-email.me>
<a434fe0c-7874-4459-a900-114d3ca77dabn@googlegroups.com>
<u3am3d$3rehk$1@dont-email.me> <u3b4qi$3tl6i$1@dont-email.me>
<u3e7et$82mc$1@dont-email.me> <u3ehn0$d2jk$1@dont-email.me>
<u3ei0l$81j8$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 10 May 2023 03:32:52 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="6eb67fd7c17c1458f51d1312f9a690f8";
logging-data="606279"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+YavE65sihuT6v8AP441pRRva0i8DUmkM="
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:0WoR1IzeSePOG2PjOgEREpvJfFk=
In-Reply-To: <u3ei0l$81j8$2@dont-email.me>
 by: Dave Froble - Wed, 10 May 2023 03:32 UTC

On 5/9/2023 6:38 PM, Chris Townley wrote:
> On 09/05/2023 23:32, Dave Froble wrote:
>> On 5/9/2023 3:38 PM, Chris Townley wrote:
>>> On 08/05/2023 16:34, Arne Vajhøj wrote:
>>>> On 5/8/2023 7:23 AM, Chris Townley wrote:
>>>>> On 08/05/2023 04:30, terry-...@glaver.org wrote:
>>>>
>>>
>>>
>>>>>> Basic:
>>>>>> 24.6609 million integer operations per second
>>>>>> 28.4091 million floating point operations per second
>>>>
>>>>> Interesting that BASIC show integer as slower than FP
>>>>
>>>> Yes. I was puzzled by that as well. But I got the same result
>>>> on my systems.
>>>>
>>>> /NOCHECK does not change it so it is not the overflow
>>>> check.
>>>>
>>>> Maybe there is some subtle error in the Basic integer
>>>> test code. But I cannot see it.
>>>>
>>>> Or maybe it is just an example of how random results
>>>> can be with a very limited benchmark - the integer
>>>> result practically depends on a single line of code.
>>>>
>>>> Arne
>>>>
>>>
>>> Finally got round to testing my thoughts.
>>>
>>> On my FreeAXP (no JIT) setup I get the following with your code:
>>>
>>> Basic:
>>> 12.3182 million integer operations per second
>>> 14.1572 million floating point operations per second
>>> 0.0080 million string operations per second
>>>
>>>
>>> I then changed the integer bits to append the % to all integer constants, and
>>> now get:
>>>
>>> Basic:
>>> 31.6586 million integer operations per second
>>>
>>> It shows how BASIC can be slowed down not doing that!
>>>
>>
>> I haven't been following this closely, but, First guess is that the variables
>> were defaulted to floating point, and then perhaps an integer conversion
>> happened?
>>
>> Can you post the code?
>>
>> Once past the compiler, the "%" and "$" signs don't matter, since the compiler
>> would assign the variables, if not declared, and it would just be data and
>> addresses/pointers afterwards.
>>
>
> Arne posted a link to the code before, but the relevant bits are:
>
> Arne's version:
>
> sub testfp(integer xscale)
>
> declare integer constant NFP = 1000
> declare integer constant N = 1000000
> declare integer i, j, nfpscale
> declare double sum
^^^^^^^^^^^^^^^^^^^^

I'm thinking that is the problem. There will be many conversions.

Also, "integer" is such a poor data type. Better to use "word" or "long" to be
rather specific what is being used.

> declare quad t1, t2
> external sub printres(quad, quad, integer, integer, string)
>
> nfpscale = NFP / xscale
> call sys$gettim(t1)
> for i = 1 to nfpscale
> sum = i - 1

Above is FP = integer - FP
Lots of conversions.

> for j = 1 to N
> sum = ((sum + 1) * 2 + 1) / 2

"1", "2", "1", and "2" are all FP

> next j
> if abs(sum - (i - 1 + 1.5 * N)) > 1 then
> print "Floating point test error"
> stop
> end if
> next i
> call sys$gettim(t2)
> call printres(t1, t2, nfpscale, N, "floating point operations")
>
> end sub

Arne mentioned elsewhere that this was the FP routine, but I'd ask, then why any
integers? FP/integer conversions are expensive.

> My changes:
>
> sub testint(integer xscale)
>
> declare integer constant NINT = 10000%
> declare integer constant N = 1000000%
> declare integer i, j, nintscale, sum
> declare quad t1, t2
> external sub printres(quad, quad, integer, integer, string)
> external long function sys$gettim(quad)
>
> nintscale = NINT / xscale
> call sys$gettim(t1)
> for i = 1% to nintscale
> sum = i - 1%
> for j = 1 to N
> sum = ((sum + 1%) * 2% + 1%) / 2%
> next j
> if sum <> (i - 1% + N) then
> print "Integer test error"
> stop
> end if
> next i
> call sys$gettim(t2)
> call printres(t1, t2, nintscale, N, "integer operations")
>
> end sub
>

--
David Froble Tel: 724-529-0450
Dave Froble Enterprises, Inc. E-Mail: davef@tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA 15486

Re: Python for x86?

<u3f3ae$ig27$2@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=28019&group=comp.os.vms#28019

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dav...@tsoft-inc.com (Dave Froble)
Newsgroups: comp.os.vms
Subject: Re: Python for x86?
Date: Tue, 9 May 2023 23:33:15 -0400
Organization: A noiseless patient Spider
Lines: 52
Message-ID: <u3f3ae$ig27$2@dont-email.me>
References: <u0ru0r$19slj$1@dont-email.me> <u0ruro$19v81$1@dont-email.me>
<u0s4ib$1aon4$1@dont-email.me> <u13n0r$2kv9o$3@dont-email.me>
<u14ntj$2nojo$1@dont-email.me> <u14q4e$2ntau$1@dont-email.me>
<u16ipp$32rgs$1@dont-email.me> <u16mnr$33egq$1@dont-email.me>
<u17n2e$7qsg$1@dont-email.me>
<14c151fb-d512-4d0e-b39f-d36b97c0eb45n@googlegroups.com>
<u18rm8$e6k4$1@dont-email.me> <u18sdn$ee1g$1@dont-email.me>
<u2piec$dfub$1@dont-email.me> <u2rh5u$rfvp$1@dont-email.me>
<u2tvid$1b6sh$1@dont-email.me> <u307pp$1qp67$2@dont-email.me>
<u38hgj$3e6ke$1@dont-email.me>
<a434fe0c-7874-4459-a900-114d3ca77dabn@googlegroups.com>
<u3am3d$3rehk$1@dont-email.me> <u3b4qi$3tl6i$1@dont-email.me>
<u3e7et$82mc$1@dont-email.me> <u3ehn0$d2jk$1@dont-email.me>
<u3ei0l$81j8$2@dont-email.me> <u3eo19$dlct$2@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 10 May 2023 03:33:34 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="6eb67fd7c17c1458f51d1312f9a690f8";
logging-data="606279"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Yxe8Tu3x7A/R1vac6DVdcgxeQ7JPQtMc="
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:583gsu1C/ONxrL2+wR5oGYPjRLs=
In-Reply-To: <u3eo19$dlct$2@dont-email.me>
 by: Dave Froble - Wed, 10 May 2023 03:33 UTC

On 5/9/2023 8:20 PM, Arne Vajhøj wrote:
> On 5/9/2023 6:38 PM, Chris Townley wrote:
>> On 09/05/2023 23:32, Dave Froble wrote:
>>> On 5/9/2023 3:38 PM, Chris Townley wrote:
>>>> I then changed the integer bits to append the % to all integer constants, and
>>>> now get:
>
>>>> It shows how BASIC can be slowed down not doing that!
>>>
>>> I haven't been following this closely, but, First guess is that the variables
>>> were defaulted to floating point, and then perhaps an integer conversion
>>> happened?
>>>
>>> Can you post the code?
>>>
>>> Once past the compiler, the "%" and "$" signs don't matter, since the
>>> compiler would assign the variables, if not declared, and it would just be
>>> data and addresses/pointers afterwards.
>
>> Arne posted a link to the code before, but the relevant bits are:
>>
>> Arne's version:
>>
>> sub testfp(integer xscale)
>
> That was the FP sub.
>
>> My changes:
>>
>> sub testint(integer xscale)
>
> I think the only important change is from:
>
> sum = ((sum + 1) * 2 + 1) / 2
>
> to:
>
> sum = ((sum + 1%) * 2% + 1%) / 2%
>
> Arne
>
>
>

Yes, no conversions.

--
David Froble Tel: 724-529-0450
Dave Froble Enterprises, Inc. E-Mail: davef@tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA 15486

Re: Python for x86?

<u3f3mu$ihfe$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=28020&group=comp.os.vms#28020

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: dav...@tsoft-inc.com (Dave Froble)
Newsgroups: comp.os.vms
Subject: Re: Python for x86?
Date: Tue, 9 May 2023 23:39:53 -0400
Organization: A noiseless patient Spider
Lines: 84
Message-ID: <u3f3mu$ihfe$1@dont-email.me>
References: <u0ru0r$19slj$1@dont-email.me> <u0ruro$19v81$1@dont-email.me>
<u0s4ib$1aon4$1@dont-email.me> <u13n0r$2kv9o$3@dont-email.me>
<u14ntj$2nojo$1@dont-email.me> <u14q4e$2ntau$1@dont-email.me>
<u16ipp$32rgs$1@dont-email.me> <u16mnr$33egq$1@dont-email.me>
<u17n2e$7qsg$1@dont-email.me>
<14c151fb-d512-4d0e-b39f-d36b97c0eb45n@googlegroups.com>
<u18rm8$e6k4$1@dont-email.me> <u18sdn$ee1g$1@dont-email.me>
<u2piec$dfub$1@dont-email.me> <u2rh5u$rfvp$1@dont-email.me>
<u2tvid$1b6sh$1@dont-email.me> <u307pp$1qp67$2@dont-email.me>
<u38hgj$3e6ke$1@dont-email.me>
<a434fe0c-7874-4459-a900-114d3ca77dabn@googlegroups.com>
<u3am3d$3rehk$1@dont-email.me> <u3b4qi$3tl6i$1@dont-email.me>
<u3e7et$82mc$1@dont-email.me> <u3enrl$dlct$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 10 May 2023 03:40:14 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="6eb67fd7c17c1458f51d1312f9a690f8";
logging-data="607726"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+aXU38MwpHeoUhj7fGbzY1hww+lxg1Kvo="
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:Emaq93z/LTcn3hxmwKaRRPs4X3k=
In-Reply-To: <u3enrl$dlct$1@dont-email.me>
 by: Dave Froble - Wed, 10 May 2023 03:39 UTC

On 5/9/2023 8:17 PM, Arne Vajhøj wrote:
> On 5/9/2023 3:38 PM, Chris Townley wrote:
>> On 08/05/2023 16:34, Arne Vajhøj wrote:
>>> On 5/8/2023 7:23 AM, Chris Townley wrote:
>>>> Interesting that BASIC show integer as slower than FP
>>>
>>> Yes. I was puzzled by that as well. But I got the same result
>>> on my systems.
>>>
>>> /NOCHECK does not change it so it is not the overflow
>>> check.
>>>
>>> Maybe there is some subtle error in the Basic integer
>>> test code. But I cannot see it.
>>
>> Finally got round to testing my thoughts.
>>
>> On my FreeAXP (no JIT) setup I get the following with your code:
>>
>> Basic:
>> 12.3182 million integer operations per second
>> 14.1572 million floating point operations per second
>> 0.0080 million string operations per second
>>
>>
>> I then changed the integer bits to append the % to all integer constants, and
>> now get:
>>
>> Basic:
>> 31.6586 million integer operations per second
>>
>> It shows how BASIC can be slowed down not doing that!
>
> I can confirm that.
>
> By changing 1 to 1% and 2 to 2% then the results are
> way more as expected.
>
> In fact BASIC is only about 25% slower than the
> other native languages and BASIC/NOCHECK is
> just as fast as the other native languages.
>
> When one knows what to look for then it is
> easy to find.
>
> The VMS Basic Reference Manual says:
>
> <quote>
> An integer constant is a literal or named constant, either positive or negative,
> with no fractional digits and an optional trailing percent sign (%). The percent
> sign is required for integer literals only if the default type is not INTEGER.
> </quote>
>
> And HELP BAS /TYPE says:
>
> <quote>
> The default is /TYPE_DEFAULT = REAL.
> </quote>
>
> so 1 and 2 are two real constants.
>
> So my mistake.
>
> I will have to rerun all the tests.
>
> Arne
>
>
>

The defaults in Basic are LONG integers and Single FP. A number, such as 1, is
treated as a single precision FP, so that makes not being specific even worse.

Note, I really don't like the FP default. Any program I write specifies the
defaults for both integers and FP. Something like:

OPTION SIZE = ( INTEGER WORD , REAL DOUBLE )

--
David Froble Tel: 724-529-0450
Dave Froble Enterprises, Inc. E-Mail: davef@tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA 15486

Re: Python for x86?

<u3fpu4$l952$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=28027&group=comp.os.vms#28027

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: new...@cct-net.co.uk (Chris Townley)
Newsgroups: comp.os.vms
Subject: Re: Python for x86?
Date: Wed, 10 May 2023 10:59:31 +0100
Organization: A noiseless patient Spider
Lines: 20
Message-ID: <u3fpu4$l952$1@dont-email.me>
References: <u0ru0r$19slj$1@dont-email.me> <u0ruro$19v81$1@dont-email.me>
<u0s4ib$1aon4$1@dont-email.me> <u13n0r$2kv9o$3@dont-email.me>
<u14ntj$2nojo$1@dont-email.me> <u14q4e$2ntau$1@dont-email.me>
<u16ipp$32rgs$1@dont-email.me> <u16mnr$33egq$1@dont-email.me>
<u17n2e$7qsg$1@dont-email.me>
<14c151fb-d512-4d0e-b39f-d36b97c0eb45n@googlegroups.com>
<u18rm8$e6k4$1@dont-email.me> <u18sdn$ee1g$1@dont-email.me>
<u2piec$dfub$1@dont-email.me> <u2rh5u$rfvp$1@dont-email.me>
<u2tvid$1b6sh$1@dont-email.me> <u307pp$1qp67$2@dont-email.me>
<u38hgj$3e6ke$1@dont-email.me>
<a434fe0c-7874-4459-a900-114d3ca77dabn@googlegroups.com>
<u3am3d$3rehk$1@dont-email.me> <u3b4qi$3tl6i$1@dont-email.me>
<u3e7et$82mc$1@dont-email.me> <u3enrl$dlct$1@dont-email.me>
<u3f3mu$ihfe$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 10 May 2023 09:59:32 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="d477a5bd91c28a763979012dc793fc3f";
logging-data="697506"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18sHs4f6zkjLcL2m2rTMetXEwlDWl6eWh8="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.10.1
Cancel-Lock: sha1:Zkg+6RlM1PpkhT22E1Q7iWL8Jz8=
In-Reply-To: <u3f3mu$ihfe$1@dont-email.me>
Content-Language: en-GB
 by: Chris Townley - Wed, 10 May 2023 09:59 UTC

On 10/05/2023 04:39, Dave Froble wrote:

>
> The defaults in Basic are LONG integers and Single FP.  A number, such
> as 1, is treated as a single precision FP, so that makes not being
> specific even worse.
>
> Note, I really don't like the FP default.  Any program I write specifies
> the defaults for both integers and FP.  Something like:
>
> OPTION SIZE = ( INTEGER WORD , REAL DOUBLE )
>

Our coding standards insisted on

OPTION TYPE = EXPLICIT

--
Chris

Re: Python for x86?

<u3g5fh$gp8$1@news.misty.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=28035&group=comp.os.vms#28035

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!.POSTED.10.184.180.213.static.wline.lns.sme.cust.swisscom.ch!not-for-mail
From: bqt...@softjar.se (Johnny Billquist)
Newsgroups: comp.os.vms
Subject: Re: Python for x86?
Date: Wed, 10 May 2023 15:16:33 +0200
Organization: MGT Consulting
Message-ID: <u3g5fh$gp8$1@news.misty.com>
References: <u0ru0r$19slj$1@dont-email.me> <u0ruro$19v81$1@dont-email.me>
<u0s4ib$1aon4$1@dont-email.me> <u13n0r$2kv9o$3@dont-email.me>
<u14ntj$2nojo$1@dont-email.me> <u14q4e$2ntau$1@dont-email.me>
<u16ipp$32rgs$1@dont-email.me> <u16mnr$33egq$1@dont-email.me>
<u17n2e$7qsg$1@dont-email.me>
<14c151fb-d512-4d0e-b39f-d36b97c0eb45n@googlegroups.com>
<u18rm8$e6k4$1@dont-email.me> <u18sdn$ee1g$1@dont-email.me>
<u2piec$dfub$1@dont-email.me> <u2rh5u$rfvp$1@dont-email.me>
<u2tvid$1b6sh$1@dont-email.me> <u307pp$1qp67$2@dont-email.me>
<u38hgj$3e6ke$1@dont-email.me>
<a434fe0c-7874-4459-a900-114d3ca77dabn@googlegroups.com>
<u3am3d$3rehk$1@dont-email.me> <u3b4qi$3tl6i$1@dont-email.me>
<u3e7et$82mc$1@dont-email.me> <u3enrl$dlct$1@dont-email.me>
<u3f3mu$ihfe$1@dont-email.me> <u3fpu4$l952$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 10 May 2023 13:16:33 -0000 (UTC)
Injection-Info: news.misty.com; posting-host="10.184.180.213.static.wline.lns.sme.cust.swisscom.ch:213.180.184.10";
logging-data="17192"; mail-complaints-to="abuse@misty.com"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0)
Gecko/20100101 Thunderbird/102.10.1
In-Reply-To: <u3fpu4$l952$1@dont-email.me>
 by: Johnny Billquist - Wed, 10 May 2023 13:16 UTC

On 2023-05-10 11:59, Chris Townley wrote:
> On 10/05/2023 04:39, Dave Froble wrote:
>
>>
>> The defaults in Basic are LONG integers and Single FP.  A number, such
>> as 1, is treated as a single precision FP, so that makes not being
>> specific even worse.
>>
>> Note, I really don't like the FP default.  Any program I write
>> specifies the defaults for both integers and FP.  Something like:
>>
>> OPTION SIZE = ( INTEGER WORD , REAL DOUBLE )
>>
>
> Our coding standards insisted on
>
> OPTION TYPE = EXPLICIT

That actually don't solve the problem observed here.
That only makes the compiler give errors if you don't explicitly declare
variables. However constants are still being of the default type defined.

Johnny

Re: Python for x86?

<u3g5k1$gp8$2@news.misty.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=28036&group=comp.os.vms#28036

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!.POSTED.10.184.180.213.static.wline.lns.sme.cust.swisscom.ch!not-for-mail
From: bqt...@softjar.se (Johnny Billquist)
Newsgroups: comp.os.vms
Subject: Re: Python for x86?
Date: Wed, 10 May 2023 15:18:57 +0200
Organization: MGT Consulting
Message-ID: <u3g5k1$gp8$2@news.misty.com>
References: <u0ru0r$19slj$1@dont-email.me> <u0ruro$19v81$1@dont-email.me>
<u0s4ib$1aon4$1@dont-email.me> <u13n0r$2kv9o$3@dont-email.me>
<u14ntj$2nojo$1@dont-email.me> <u14q4e$2ntau$1@dont-email.me>
<u16ipp$32rgs$1@dont-email.me> <u16mnr$33egq$1@dont-email.me>
<u17n2e$7qsg$1@dont-email.me>
<14c151fb-d512-4d0e-b39f-d36b97c0eb45n@googlegroups.com>
<u18rm8$e6k4$1@dont-email.me> <u18sdn$ee1g$1@dont-email.me>
<u2piec$dfub$1@dont-email.me> <u2rh5u$rfvp$1@dont-email.me>
<u2tvid$1b6sh$1@dont-email.me> <u307pp$1qp67$2@dont-email.me>
<u38hgj$3e6ke$1@dont-email.me>
<a434fe0c-7874-4459-a900-114d3ca77dabn@googlegroups.com>
<u3am3d$3rehk$1@dont-email.me> <u3b4qi$3tl6i$1@dont-email.me>
<u3e7et$82mc$1@dont-email.me> <u3ehn0$d2jk$1@dont-email.me>
<u3ei0l$81j8$2@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 10 May 2023 13:18:58 -0000 (UTC)
Injection-Info: news.misty.com; posting-host="10.184.180.213.static.wline.lns.sme.cust.swisscom.ch:213.180.184.10";
logging-data="17192"; mail-complaints-to="abuse@misty.com"
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0)
Gecko/20100101 Thunderbird/102.10.1
In-Reply-To: <u3ei0l$81j8$2@dont-email.me>
 by: Johnny Billquist - Wed, 10 May 2023 13:18 UTC

On 2023-05-10 00:38, Chris Townley wrote:

> My changes:
>
> sub testint(integer xscale)
>
> declare integer constant NINT = 10000%
> declare integer constant N = 1000000%
> declare integer i, j, nintscale, sum
> declare quad t1, t2
> external sub printres(quad, quad, integer, integer, string)
> external long function sys$gettim(quad)
>
> nintscale = NINT / xscale
> call sys$gettim(t1)
> for i = 1% to nintscale
>     sum = i - 1%
>     for j = 1 to N

Here is still an untyped 1...

>         sum = ((sum + 1%) * 2% + 1%) / 2%
>     next j
>     if sum <> (i - 1% + N) then
>         print "Integer test error"
>         stop
>     end if
> next i
> call sys$gettim(t2)
> call printres(t1, t2, nintscale, N, "integer operations")
>
> end sub

But yeah, classic BASIC issue. Default all values are FP.

Johnny

Re: Python for x86?

<u3g819$moov$2@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=28043&group=comp.os.vms#28043

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: arn...@vajhoej.dk (Arne Vajhøj)
Newsgroups: comp.os.vms
Subject: Re: Python for x86?
Date: Wed, 10 May 2023 10:00:08 -0400
Organization: A noiseless patient Spider
Lines: 40
Message-ID: <u3g819$moov$2@dont-email.me>
References: <u0ru0r$19slj$1@dont-email.me> <u0ruro$19v81$1@dont-email.me>
<u0s4ib$1aon4$1@dont-email.me> <u13n0r$2kv9o$3@dont-email.me>
<u14ntj$2nojo$1@dont-email.me> <u14q4e$2ntau$1@dont-email.me>
<u16ipp$32rgs$1@dont-email.me> <u16mnr$33egq$1@dont-email.me>
<u17n2e$7qsg$1@dont-email.me>
<14c151fb-d512-4d0e-b39f-d36b97c0eb45n@googlegroups.com>
<u18rm8$e6k4$1@dont-email.me> <u18sdn$ee1g$1@dont-email.me>
<u2piec$dfub$1@dont-email.me> <u2rh5u$rfvp$1@dont-email.me>
<u2tvid$1b6sh$1@dont-email.me> <u307pp$1qp67$2@dont-email.me>
<u38hgj$3e6ke$1@dont-email.me>
<a434fe0c-7874-4459-a900-114d3ca77dabn@googlegroups.com>
<u3am3d$3rehk$1@dont-email.me> <u3b4qi$3tl6i$1@dont-email.me>
<u3e7et$82mc$1@dont-email.me> <u3ehn0$d2jk$1@dont-email.me>
<u3ei0l$81j8$2@dont-email.me> <u3f394$ig27$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 10 May 2023 14:00:09 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c75883259f189a4a5a94bac03529d77e";
logging-data="746271"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/3f2zcCvk/jzjxl7whpbutIhXaMeQOUMc="
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.10.1
Cancel-Lock: sha1:XUgLouHVUorNp41RypOibqwEqvk=
In-Reply-To: <u3f394$ig27$1@dont-email.me>
Content-Language: en-US
 by: Arne Vajhøj - Wed, 10 May 2023 14:00 UTC

On 5/9/2023 11:32 PM, Dave Froble wrote:
> On 5/9/2023 6:38 PM, Chris Townley wrote:
>> Arne posted a link to the code before, but the relevant bits are:
>>
>> Arne's version:
>>
>> sub testfp(integer xscale)
>>
>> declare integer constant NFP = 1000
>> declare integer constant N = 1000000
>> declare integer i, j, nfpscale
>> declare double sum
> ^^^^^^^^^^^^^^^^^^^^
>
> I'm thinking that is the problem.  There will be many conversions.

sum has to be FP in testfp.

The problem was in testint.

>>     for j = 1 to N
>>         sum = ((sum + 1) * 2 + 1) / 2

> "1", "2", "1", and "2" are all FP

so:

>> for j = 1 to N
>> sum = ((sum + 1%) * 2% + 1%) / 2%
>> next j

And that was the problem.

The assumption that 1 and 2 were integer literals.

Arne

Re: Python for x86?

<u3gbiv$mql2$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=28044&group=comp.os.vms#28044

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: arn...@vajhoej.dk (Arne Vajhøj)
Newsgroups: comp.os.vms
Subject: Re: Python for x86?
Date: Wed, 10 May 2023 11:00:46 -0400
Organization: A noiseless patient Spider
Lines: 28
Message-ID: <u3gbiv$mql2$1@dont-email.me>
References: <u0ru0r$19slj$1@dont-email.me> <u0ruro$19v81$1@dont-email.me>
<u0s4ib$1aon4$1@dont-email.me> <u13n0r$2kv9o$3@dont-email.me>
<u14ntj$2nojo$1@dont-email.me> <u14q4e$2ntau$1@dont-email.me>
<u16ipp$32rgs$1@dont-email.me> <u16mnr$33egq$1@dont-email.me>
<u17n2e$7qsg$1@dont-email.me>
<14c151fb-d512-4d0e-b39f-d36b97c0eb45n@googlegroups.com>
<u18rm8$e6k4$1@dont-email.me> <u18sdn$ee1g$1@dont-email.me>
<u2piec$dfub$1@dont-email.me> <u2rh5u$rfvp$1@dont-email.me>
<u2tvid$1b6sh$1@dont-email.me> <u307pp$1qp67$2@dont-email.me>
<u38hgj$3e6ke$1@dont-email.me>
<a434fe0c-7874-4459-a900-114d3ca77dabn@googlegroups.com>
<u3am3d$3rehk$1@dont-email.me> <u3b4qi$3tl6i$1@dont-email.me>
<u3e7et$82mc$1@dont-email.me> <u3enrl$dlct$1@dont-email.me>
<u3f3mu$ihfe$1@dont-email.me> <u3fpu4$l952$1@dont-email.me>
<u3g5fh$gp8$1@news.misty.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 10 May 2023 15:00:47 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="c75883259f189a4a5a94bac03529d77e";
logging-data="748194"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/jeKv60X/s9nqwz7IBYnj3CfB2u0dRbCo="
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.10.1
Cancel-Lock: sha1:O9NYNhBqjFpZgR65R/tgkIjOis8=
In-Reply-To: <u3g5fh$gp8$1@news.misty.com>
Content-Language: en-US
 by: Arne Vajhøj - Wed, 10 May 2023 15:00 UTC

On 5/10/2023 9:16 AM, Johnny Billquist wrote:
> On 2023-05-10 11:59, Chris Townley wrote:
>> On 10/05/2023 04:39, Dave Froble wrote:
>>> The defaults in Basic are LONG integers and Single FP.  A number,
>>> such as 1, is treated as a single precision FP, so that makes not
>>> being specific even worse.
>>>
>>> Note, I really don't like the FP default.  Any program I write
>>> specifies the defaults for both integers and FP.  Something like:
>>>
>>> OPTION SIZE = ( INTEGER WORD , REAL DOUBLE )
>>
>> Our coding standards insisted on
>>
>> OPTION TYPE = EXPLICIT
>
> That actually don't solve the problem observed here.
> That only makes the compiler give errors if you don't explicitly declare
> variables. However constants are still being of the default type defined.

I am not a Basic person so not sure how much my opinion
should count, but I think it would be nice with:

$ BASIC/VAR_TYPE_DEFAULT=EXPLICIT/LITERAL_TYPE_DEFAULT=INTEGER ...

Arne

Re: Python for x86?

<u3gc1f$l952$2@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=28045&group=comp.os.vms#28045

  copy link   Newsgroups: comp.os.vms
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: new...@cct-net.co.uk (Chris Townley)
Newsgroups: comp.os.vms
Subject: Re: Python for x86?
Date: Wed, 10 May 2023 16:08:30 +0100
Organization: A noiseless patient Spider
Lines: 36
Message-ID: <u3gc1f$l952$2@dont-email.me>
References: <u0ru0r$19slj$1@dont-email.me> <u0ruro$19v81$1@dont-email.me>
<u0s4ib$1aon4$1@dont-email.me> <u13n0r$2kv9o$3@dont-email.me>
<u14ntj$2nojo$1@dont-email.me> <u14q4e$2ntau$1@dont-email.me>
<u16ipp$32rgs$1@dont-email.me> <u16mnr$33egq$1@dont-email.me>
<u17n2e$7qsg$1@dont-email.me>
<14c151fb-d512-4d0e-b39f-d36b97c0eb45n@googlegroups.com>
<u18rm8$e6k4$1@dont-email.me> <u18sdn$ee1g$1@dont-email.me>
<u2piec$dfub$1@dont-email.me> <u2rh5u$rfvp$1@dont-email.me>
<u2tvid$1b6sh$1@dont-email.me> <u307pp$1qp67$2@dont-email.me>
<u38hgj$3e6ke$1@dont-email.me>
<a434fe0c-7874-4459-a900-114d3ca77dabn@googlegroups.com>
<u3am3d$3rehk$1@dont-email.me> <u3b4qi$3tl6i$1@dont-email.me>
<u3e7et$82mc$1@dont-email.me> <u3enrl$dlct$1@dont-email.me>
<u3f3mu$ihfe$1@dont-email.me> <u3fpu4$l952$1@dont-email.me>
<u3g5fh$gp8$1@news.misty.com> <u3gbiv$mql2$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 10 May 2023 15:08:31 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="d477a5bd91c28a763979012dc793fc3f";
logging-data="697506"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19JKFcCRJ0LHXtYk7vaDhqvy13RwIoy0kQ="
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.10.1
Cancel-Lock: sha1:yLExUYbqv67EHn7flI0LHDRa5Qw=
Content-Language: en-GB
In-Reply-To: <u3gbiv$mql2$1@dont-email.me>
 by: Chris Townley - Wed, 10 May 2023 15:08 UTC

On 10/05/2023 16:00, Arne Vajhøj wrote:
> On 5/10/2023 9:16 AM, Johnny Billquist wrote:
>> On 2023-05-10 11:59, Chris Townley wrote:
>>> On 10/05/2023 04:39, Dave Froble wrote:
>>>> The defaults in Basic are LONG integers and Single FP.  A number,
>>>> such as 1, is treated as a single precision FP, so that makes not
>>>> being specific even worse.
>>>>
>>>> Note, I really don't like the FP default.  Any program I write
>>>> specifies the defaults for both integers and FP.  Something like:
>>>>
>>>> OPTION SIZE = ( INTEGER WORD , REAL DOUBLE )
>>>
>>> Our coding standards insisted on
>>>
>>> OPTION TYPE = EXPLICIT
>>
>> That actually don't solve the problem observed here.
>> That only makes the compiler give errors if you don't explicitly
>> declare variables. However constants are still being of the default
>> type defined.
>
> I am not a Basic person so not sure how much my opinion
> should count, but I think it would be nice with:
>
> $ BASIC/VAR_TYPE_DEFAULT=EXPLICIT/LITERAL_TYPE_DEFAULT=INTEGER ...
>
> Arne

When using Basic, it is not difficult to get in the habit of using %, or
if valid FP use, for example, 1.0
Within my team I would always check for this in code reviews

--
Chris


computers / comp.os.vms / Re: Python for x86?

Pages:123456
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor