The need for speed

Please discuss general Delphi programming topics here.

The need for speed

Postby Wardlow » July 2nd, 2007, 3:50 am

With all the help on the forum I can say that I've finally gotten my program to where I want it. My program runs through data... a lot of it. Usually my program takes about 1 hr to run completely.

How can I increase the speed at which my program runs. I have a 2 GB of RAM, would it be faster if I install vista and run 8GB of RAM.

Ideas would be greatly appreciated

Thanks
Wardlow
Junior Member
Junior Member
 
Posts: 38
Joined: May 31st, 2007, 10:08 pm

Postby Johnny_Bit » July 3rd, 2007, 4:22 am

no, it wouldn't.

Vista is just a useless slow-downer of everything.

Amount of ram is important when your prog uses a lot of data (enough to exceed available ram).

You know, depending on what your prog does and on what kind of data it processes and also from where it reads it and writes it sped can dramatically change. Also very important is quality of code, used algorithms and so on...

Tell you what, I once wrote an app in delphi to help me deal with my data ( about 500x (from 10 to 15) files) and it did it's job nicely, in just about 10 minutes every little thing done. Then I moved to linux and I wanted to try something else, so I used PHP in CLI, at that point data grew pretty good ( instead of 500 it was now 900), prog was way shorter and needed only 5 minutes to get al the work done. Now I rewrited it again, using my whole knowledge about optimization and so on, code grew a little, but prog does his work in less than a half a minute on 1200 x (10 to 16) files... So... you know there's no way of telling how you could speed up your prog without knowing it.
Thou shalt write the code, not connect the bricks.
Johnny_Bit
VIP Member
VIP Member
 
Posts: 455
Joined: June 15th, 2003, 9:56 am

Postby Wardlow » July 3rd, 2007, 5:02 pm

No, I checked and I only use 50% of the available RAM.

Is there any book you'd recommend that shows ways to increase the efficiency the way you program?

THanks
Wardlow
Junior Member
Junior Member
 
Posts: 38
Joined: May 31st, 2007, 10:08 pm

Postby Johnny_Bit » July 3rd, 2007, 5:27 pm

there's no "Optimizing apps for Dummies", so sorry, no-go here.

Another thing is: I'd recommend Knuth's books, but reading them made me scream aloud "Why? Why? Why you fu*ked up, crazed a*s weirdo beaver?"... Well only sometimes, so you may try it as long as your brain won't melt. Experience helps here a lot.

Since I don't have any idea what your program does, I may as well give you wrong tips, so here is couple always useful:

  • Do not copy thing all over the place if it's not needed
  • If you do any outputting in large amounts, buffer it!
  • Do not jump all over the place, keep everything working as straight as possible
  • The more recurency you use, the worse
Thou shalt write the code, not connect the bricks.
Johnny_Bit
VIP Member
VIP Member
 
Posts: 455
Joined: June 15th, 2003, 9:56 am


Return to Delphi Programming

Who is online

Users browsing this forum: No registered users and 17 guests

cron