× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On Fri, 27 Sep 2002, Rick Rayburn wrote:
>
> but is there any performance issue with 55 pointers at once? forget the
> program and maintenance factors for a minute...will it jeopardize the
> execution of the order entry program?
>


First of all, if you REALLY want to know how long it takes to pass 55
parameters, why don't you write a program and try it?   Make it call
another program in a loop, and benchmark how fast it is with 55 and
compare that to how fast it is with one.   The results of this will tell
you EXACTLY what you want to know, and it's a really simple program to
write.

If you just want to think about it, rather than try it, then let's start
thinking about what the computer is doing.   For each parameter that you pass,
the system has to copy the address of that parameter to a place where the
new program can read it.   I know PCs use the stack for this, I assume the
AS/400 works similarly.

so, if you have 1 parameter, the time it takes is the time it takes to
copy 16 bytes.

If you have 55 parameter, you have 55 times as many bytes to copy.
55 x 16 = 880 bytes to copy.

So, the question you're asking REALLY is, "will copying 880 bytes be too
slow for me?"

The AS/400 today is a 64-bit machine.   So, I'm thinking it takes probably
2-3 clock cycles to copy 64 bits (half of one pointer).  I could be wrong,
I'm not that well versed in how the hardware works at that level.  But,
it's probably a good enough guess.   So, if it takes 3 clock cycles for 64
bits, that means to copy 880 bytes will take 330 clock cycles.   Of
course, that's probably not realistic, as I'm sure there's other overhead.

But, think about it, your computer is probably at LEAST 200mhz.  (200
MILLION clock cycles per second)  even if it takes 10 times that long,
you're still looking at only 30 microseconds to pass 55 parameters.

I just can't see how this would ever be significant to you.   Stop
worrying about the speed, and worry about what's easy to MAINTAIN.





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.