Solved

Structure Vs Optimisation & Algorithm Efficiency

Posted on 1998-08-30
1
239 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month9 days, 23 hours left to enroll

624 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