[Info-vax] Python for x86?

Dave Froble davef at tsoft-inc.com
Tue May 9 23:39:53 EDT 2023


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 at tsoft-inc.com
DFE Ultralights, Inc.
170 Grimplin Road
Vanderbilt, PA  15486



More information about the Info-vax mailing list