Solved

Structure Vs Optimisation & Algorithm Efficiency

Posted on 1998-08-30
1
236 Views
Last Modified: 2010-04-30
With the advent of Faster Chips etc - should applications developers be concentrating on Program structure Vs Optimising for Speed ?
When first developing a solution to a problem - I develop an algorithm that solves the problem - If this problem is a new problem - I find it extremely difficult at the semantic level to think of more efficient solutions - gets easy once the program is coded - I always just code the first working solution I get - is this the same for you - please contact mw with your thoughts - as I do not use any optimisation techniques - only do if programs are slow I use Vb 5.0 - what do you think then ??

0
Comment
Question by:gmiajy4
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 14

Accepted Solution

by:
waty earned 50 total points
ID: 1431983
When you will experience with VB, you will see that all the code you will write will be nearly optimized (of course, you have to take care to have a readble application for later maintenance).

There is a lot of little optimization you can done easily without thinking too much.

Ex : If you go through all a recordset, (1000 records), don' t use the following code :

   Do while record.EOF = FALSE  
     ....
     record.MoveNext
   loop

Use instead

   record.Movelast
   record.Movefirst
   For nI = 1 to record.Recordcount
     ....
     record.MoveNext
   Next

This is due that in the first sample, you will test each time the EOF of the recordset. In the second sample, you will never do that. This increase a lot for large recordset.

If you are interressed, I have written a document indicating how to write a VB app with optimizations...

waty.thierry@usa.net
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question