× 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.


  • Subject: Re: Expensive op codes
  • From: Jim Langston <jlangston@xxxxxxxxxxxxxxxx>
  • Date: Mon, 18 Oct 1999 09:14:27 -0700
  • Organization: Conex Global Logistics Services, Inc.

I would make the general observation that in your libraries (general purpose
procedures) I would tend to sacrifice legibility for speed and performance,
but I would also tend to highly comment them more so than normal code.

I have worked on libraries for other languages, and the types of things you
put into libraries tend to be a bit convoluted anyway, and saving even a very
little bit in a library call can save a substantial time in a program that calls
your procedure or function numerous times.

So I would tend to optimize the heck out of the procedures in there, so they
usually weren't understandable, but then comment exactly what I was doing,
as comments don't increase anything in the final product.

In my programs, though, I would tend to go the other route and make them
as legible and self documenting as I could, as long as there wasn't a 
significant
reduction in execution time.

Regards,

Jim Langston

bmorris@ca.ibm.com wrote:

> [SNIP]

> If you are writing a general-purpose procedure that will be called by every
> application you write, I think you have the responsibility to spend a bit of
> extra time to at least consider performance.  When you write the same code
> inline, you know whether it's performance critical at the time you write it, 
>so
> you can discount performance in some cases.  But when you write a
> general-purpose function, you should write it as though it's going to be 
>called
> in performance-critical situations, because it probably IS going to be.

[SNIP]

+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.