Results 1 to 40 of 77

Thread: tips for optimizing vb code

Hybrid View

  1. #1

    Thread Starter
    Hyperactive Member Maven's Avatar
    Join Date
    Feb 2003
    Location
    Greeneville, TN
    Posts
    322

    Re: tips for optimizing vb code

    Quote Originally Posted by szlamany
    I think someone should look at the difference in machine code generated by the FOR loop vs the DO loop.

    Let's say that the "slower" one simply has one or two op-codes of extra machine code. That is "execution time" meaningful in this "loop that does nothing-but-loop" time test.

    But would be completely trivial in a real loop that is doing something within the loop that actually takes some time!
    Tell ya what, I will tomorrow maybe =)

    btw - I think this effort is a waste of time. A for may provide a better solution then do on certain problems and vice versa.
    Education is an admirable thing, but it is well to remember from time to time that nothing that is worth knowing can be taught. - Oscar Wilde

  2. #2
    Software Carpenter dee-u's Avatar
    Join Date
    Feb 2005
    Location
    Pinas
    Posts
    11,127

    Re: tips for optimizing vb code

    This might also be of help to vb coders:
    http://www.codeguru.com/forum/showth...ighlight=speed
    Regards,


    As a gesture of gratitude please consider rating helpful posts. c",)

    Some stuffs: Mouse Hotkey | Compress file using SQL Server! | WPF - Rounded Combobox | WPF - Notify Icon and Balloon | NetVerser - a WPF chatting system

  3. #3

    Thread Starter
    Hyperactive Member Maven's Avatar
    Join Date
    Feb 2003
    Location
    Greeneville, TN
    Posts
    322

    Re: tips for optimizing vb code

    Quote Originally Posted by dee-u
    This might also be of help to vb coders:
    http://www.codeguru.com/forum/showth...ighlight=speed
    Even using small names for variables could make it
    gain something in speed (you know, like "Dim a as
    string" and "Dim b as long"), but then you will chatch
    an headache when have to try to maintain code or develope
    more after some times...
    That is untrue. The name you use is just a label applied to a memory location while you're coding it, it doesnt actually appear in the compiled exe.
    Education is an admirable thing, but it is well to remember from time to time that nothing that is worth knowing can be taught. - Oscar Wilde

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width