[Info-vax] Python for x86?
Arne Vajhøj
arne at vajhoej.dk
Tue May 9 20:17:56 EDT 2023
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
More information about the Info-vax
mailing list