[Info-vax] Opportunity for VSI?
Tim Sneddon
tsneddon at panix.com
Sun Dec 16 21:25:15 EST 2018
Dave Froble <davef at tsoft-inc.com> wrote:
> On 12/15/2018 1:52 PM, Robert A. Brooks wrote:
>> On 12/15/2018 1:21 PM, Dave Froble wrote:
>>
>>> Now John, to get serious, when are you going to fix that despicable
>>> problem in Basic, you know, the horrible performance when returning
>>> from subprograms?
>>
>> What problem is that?
>>
>>
>
> John discussed it in the past, after I rubbed his nose in it. As I
> understand things, when returning from a Basic subroutine, the procedure
> must "walk the stack" for some reason. Now call a simple routine
> several hundred thousand times, and you will see horrible performance.
> We've had to take the code form the routines and place it inline in
> programs where it is an issue.
I'm not sure it is to do with returning, I'm pretty sure it is actually
the call. Part of the BASIC prologue requires the routine to hunt for
some sort of context. It has been a few years since I looked at this,
but I think it had a lot to do with compile time options that control
precision and things of that nature.
This problem was also experienced on Alpha. However, it was solved by
some rather crafty MACRO-64 that walked the stack chain to find this
context. However, on Itanium this code was replaced with calls to
the LIB$ calling standard routines (like the original Alpha code)
which has made things much slower (again).
Regards, Tim.
More information about the Info-vax
mailing list